diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-05 20:35:37 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-05 20:35:37 +0300 |
| commit | e09d1905d8e9e0c0a24e11c733ef3b839e63797b (patch) | |
| tree | 80d3c2ce5dfacfb490573ef4ca7f89ef0c064620 | |
| parent | 75d66f5dda90a6ebeeb1f338a241f3bad2490fb1 (diff) | |
| download | vyos-documentation-e09d1905d8e9e0c0a24e11c733ef3b839e63797b.tar.gz vyos-documentation-e09d1905d8e9e0c0a24e11c733ef3b839e63797b.zip | |
docs(claude.md): document LLM-facing files and RTD layout
Add two sections to CLAUDE.md so future contributors (and AI coding
agents) know where llms.txt comes from and how html_baseurl per branch
should be set:
- LLM-Facing Files: how llms.txt is rendered from the Jinja template at
build time, where the hook lives, and the rule for adding new
top-level sections.
- Read the Docs Layout: canonical version slugs (rolling/1.5/1.4/...)
vs URL-level redirect aliases (latest/lts/stable/codename), with the
rule that html_baseurl points at the canonical not the alias.
🤖 Generated by [robots](https://vyos.io)
| -rw-r--r-- | CLAUDE.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -105,6 +105,45 @@ Each configuration page should contain: 4. **Known issues** — problems and workarounds 5. **Debugging** — log collection, `show` commands, state indicators +## LLM-Facing Files (`llms.txt`, `llms-full.txt`) + +Both files are regenerated on every Sphinx HTML build. They're shipped at the +docs root for each version (`https://docs.vyos.io/en/<version>/llms.txt`, +`.../llms-full.txt`). + +- **`llms-full.txt`** — auto-generated by the `sphinx_llms_txt` extension from + the full corpus. No curation; configured by `llms_txt_file = False` (which + disables the extension's *index* output, not the full output). +- **`llms.txt`** — curated overview rendered at build time from + `docs/_templates/llms.txt.j2`. URLs and the version line are interpolated + from `html_baseurl` and `release` so the file always matches the branch. + The render lives in `_write_llms_txt(app, exception)` in `docs/conf.py`, + wired via `app.connect('build-finished', ...)`. + +When adding new top-level sections to the docs, add a corresponding bullet in +`docs/_templates/llms.txt.j2`. Branch-specific differences (e.g. sagitta has +no `vpp/` or `contributing/index`) live in that branch's copy of the template. + +## Read the Docs Layout + +RTD slugs as of 2026-05-04 (verified via API): + +| Slug | Verbose | Branch | Role | +|---|---|---|---| +| `rolling` | current | `current` | canonical for rolling/next major | +| `1.5` | circinus | `circinus` | canonical for current LTS | +| `1.4` | sagitta | `sagitta` | canonical for previous LTS | +| `1.3`, `1.2` | equuleus, crux | older | canonical for older releases | + +URL-level redirect aliases (resolve to the canonicals above): +`/en/latest/* → /en/rolling/`, `/en/lts/* → /en/1.5/`, +`/en/stable/* → /en/lts/`, `/en/circinus*`, `/en/sagitta*`, +`/en/equuleus*`, `/en/crux*` → numeric slugs. + +`html_baseurl` per branch must point at the canonical (numeric or `rolling`), +not the alias, so `<link rel="canonical">` and the sitemap match what RTD +serves and crawlers skip the redirect hop. + ## CI - **Linter** (`doc-linter.py` from `vyos/.github`): checks line length and IP addresses on changed files only |
