diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 08:48:02 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 08:48:02 +0300 |
| commit | 23d6a3ef8afb0fddc0cc7c4591014b971ee2edf4 (patch) | |
| tree | ca3a1096f03541ec2d994f0157ce90c7e9d5f0f7 /docs/_static/css | |
| parent | b8fc0b98dadc8eabf584ed9db599c37f454dfaaf (diff) | |
| download | vyos-documentation-23d6a3ef8afb0fddc0cc7c4591014b971ee2edf4.tar.gz vyos-documentation-23d6a3ef8afb0fddc0cc7c4591014b971ee2edf4.zip | |
docs: render llms.txt at build time (circinus)
Parity with [#1874](https://github.com/vyos/vyos-documentation/pull/1874) (current) and [#1876](https://github.com/vyos/vyos-documentation/pull/1876)
(sagitta). Replaces the static `docs/_html_extra/llms.txt` with a Jinja
template (`docs/_templates/llms.txt.j2`) rendered at build time via a
`build-finished` hook in `conf.py`. URLs and the version line are
interpolated from `html_baseurl` and `release`, so the rendered file
always matches what circinus actually serves.
Hook behavior matches `current`/`sagitta` exactly, including the two
review-cycle hardenings landed on those PRs:
- Skips on builders other than `html` and `readthedocs` — the curated
template encodes `.html` URLs which don't match `dirhtml` output.
- `RuntimeError` if `html_baseurl` is empty rather than silently
rendering broken root-relative URLs.
- Jinja `Environment(undefined=StrictUndefined)` so a typo in
`llms.txt.j2` raises at build time instead of writing a half-blank
`llms.txt`.
The closed PR [#1875](https://github.com/vyos/vyos-documentation/pull/1875) was the previous attempt; this re-lands the change after the
post-flip rebase situation cleared.
Verified locally: hook tests (happy-path render, fail-fast on
`html_baseurl=None`/`''`, `StrictUndefined` catches `{{ relase }}`
typo, skips `dirhtml`, skips on build exception) pass against this
worktree.
\xf0\x9f\xa4\x96 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs/_static/css')
0 files changed, 0 insertions, 0 deletions
