Commit dc4dd3c
committed
docs(tools/build-docs): render plugin DOCUMENTATION blocks into the MkDocs site
The Linuxfabrik LFOps documentation site only covered roles and the top-
level project pages. Modules, lookup plugins and filter plugins had to be
discovered via `ansible-doc` on a checkout. This commit extends
`tools/build-docs` so every Python file under `plugins/{modules,lookup,
filter}/` that carries an Ansible-style `DOCUMENTATION` block is rendered
into Markdown and added to the site navigation.
Implementation
* AST-based extraction of the DOCUMENTATION (parsed YAML), EXAMPLES (raw
string), and RETURN (parsed YAML) module-level constants.
* Markdown renderer that emits a header, synopsis, optional version-added,
requirements list, parameters table (with suboptions folded into the
description column), examples code block, return values table, notes,
and authors.
* Per-kind output directory: `docs/modules/`, `docs/lookup/`, `docs/filter/`,
with stale `.md` files cleaned up before each rebuild.
* Name-collision handling: pages keep their bare name in the nav unless a
plugin name is shared across more than one kind (e.g. `bitwarden_item`
exists both as a module and as a lookup plugin); collisions get a
` (lookup)` / ` (filter)` suffix in the nav label.
Navigation
The nav is reorganised so the project meta pages (Home, Compatibility,
Playbooks, STIGs, Security, Contributing) live under a single
"Linuxfabrik LFOps" section, with "Roles" and "Modules" as the two
technical sibling sections below. The site Home page is now a symlink to
the repository's `README.md` (badges, hero block, the full table of
contents, all included), so the docs site landing page matches the
GitHub README without manual sync.
Drive-by
`plugins/modules/uptimerobot_monitor.py` carried two description bullets
of the form "For C(type=keyw): C(exist) alerts ...". The colon ended the
YAML key prematurely, so its DOCUMENTATION did not parse. Reworded to
"For C(type=keyw), C(exist) alerts ..." (and the analogous spot for
sub_type), and the page renders.
`.gitignore` gains the four new auto-generated paths (`/docs/index.md`,
`/docs/modules/`, `/docs/lookup/`, `/docs/filter/`); the previously
hand-curated `docs/index.md` is removed from tracking.1 parent 0574427 commit dc4dd3c
4 files changed
Lines changed: 330 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments