This documentation system
You are reading the output of this system. Since 2026-10-24 it is
one site with one theme: the Astro showcase and this agent book
are built together from rhels/lab-docs-source and served by one
image at the docs front door — the showcase at /, this book at
/agent-docs/. Before that date the book was a separate MkDocs
build with a mismatched theme; MkDocs is retired (see “History”
below) and there is exactly one source of truth for book
content: the markdown in the Astro content collection.
Part A — How it is set up
- Source layout (
rhels/lab-docs-source):site/— the Astro site. Showcase pages are hand-written.astropages; the book is a content collection:site/src/content/docs/**/*.md, one file per page, with frontmatter (title,section,order,summary).- A dynamic route renders every collection entry at
/agent-docs/<path>/inside the site’s own Layout — same header, sidebar, and stylesheet as the cover. The collection’sindex.mdrenders at/agent-docs/itself. llms.txtandinventory.jsonunder/agent-docs/are generated at build time from the same collection and the inventory snapshot — they are endpoints, not files, so they can never drift from the pages.- Inter-page links in the markdown are written as
content-root-relative
.mdpaths (e.g.[vault.md](vault.md),[tools/harbor.md](tools/harbor.md)); a remark step in the Astro config rewrites them to site URLs at build time. inventory/— the inventory generator + the sanitization audit (audit-bundle.py).
- The gates (CI,
build-deploy.yml, on themini-k8srunners): gitleaks on source → regenerate inventory → Astro build → gitleaks on the bundle →audit-bundle.pyon the bundle. The audit forbids IPs, tailnet/hostname-like suffixes, emails, key material, and token-shaped strings in anything served — including these pages. - The publish loop (2026-11-01): automated pipeline via
workflow_dispatchwithDOCS_PUBLISH_ENABLED→ build/audit → pushharbor.rhels.com/library/lab-docs:<tag>→ workflow pins the full Harbor reference in GitOps → Argo CD rollstooling-lab-docs. Verify the publishedpublish-marker.txtrecords the intendedsource_sha. The mini-hostlab-docs-image-syncferry cron is retired;scripts/build-image.shis a manual fallback only. Sources: lab-monorepo#99, docs PR #31, GitOps PR #126. - Not published: the public GitHub Pages path stays gated off (private repo, Free-plan org, Pages disabled — the would-be URL returns 404). The deploy job exists but runs only on manual dispatch with a repo variable set, which nobody has set. See cicd.md.
History
- Until 2026-10-24: the book was MkDocs Material (
agent-docs/), copied into the image as a second bundle. It rendered in a different theme from the showcase, which is why the owner ordered the migration. The MkDocs tree, its config, and its CI steps were removed in the same change that introduced the content collection; the markdown moved withgit mv, so page history is preserved. Nothing consumes MkDocs output anymore.
Part B — How to use it
- Edit a page: edit the
.mdfile insite/src/content/docs/(tool pages live intools/). Keep the frontmatter intact. Follow the sanitization boundary as you write — names of the lab’s own services andrhels.comfront doors are fine; IPs, tailnet names, emails, credential values, and real password hashes are forbidden and the audit will fail the build on them. - Add a page: create the
.mdwith frontmatter (title,section,order,summary). It joins the book’s table of contents and the generatedllms.txtautomatically — there is no nav file to edit. Link to it from the book index’s tool matrix if it is a tool page. - Structure rule for tool pages: Part A how it is set up (deployment, GitOps source, the mechanics that surprise people), then Part B how to use it (the handful of tasks a reader actually performs). Facts are dated when they are observations rather than design.
- Preview: from
site/,npm run devfor the dev server, ornpm run buildand inspectdist/— the build the CI runs is the same one. (The lab image build usesASTRO_BASE=/; a bare local build defaults to the Pages base path, which only changes link prefixes.) - Publish (2026-11-01, lab-monorepo#99): commit + push → dispatch
the workflow with
DOCS_PUBLISH_ENABLEDenabled → confirm build/audit and Harbor push succeed → confirm the workflow pins the fullharbor.rhels.com/library/lab-docs:<tag>reference in GitOps → confirmtooling-lab-docsis Synced/Healthy → fetchpublish-marker.txtand comparesource_shawith the intended source revision → fetch each changed page and verify its content. Usescripts/build-image.shonly as a manual fallback.