diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-04 11:02:44 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-04 11:02:44 +0300 |
| commit | a03751b72d443bcee94b5a222806915329bfa03e (patch) | |
| tree | 03e67b1209f67a2574f64aa62d6d7a81fb84d970 | |
| parent | 3f9bce80871ca4e97ab3af536e70d229ee751660 (diff) | |
| download | vyos-documentation-a03751b72d443bcee94b5a222806915329bfa03e.tar.gz vyos-documentation-a03751b72d443bcee94b5a222806915329bfa03e.zip | |
docs: render llms.txt at build time from a Jinja template
Replace the static curated llms.txt with a build-time render that
interpolates html_baseurl and release into the file, so the file always
matches the branch it was built from. llms-full.txt is already
auto-generated by sphinx-llms-txt.
🤖 Generated by [robots](https://vyos.io)
| -rw-r--r-- | docs/_html_extra/llms.txt | 52 | ||||
| -rw-r--r-- | docs/_templates/llms.txt.j2 | 52 | ||||
| -rw-r--r-- | docs/conf.py | 16 |
3 files changed, 68 insertions, 52 deletions
diff --git a/docs/_html_extra/llms.txt b/docs/_html_extra/llms.txt deleted file mode 100644 index a8f5b002..00000000 --- a/docs/_html_extra/llms.txt +++ /dev/null @@ -1,52 +0,0 @@ -# VyOS - -> VyOS is a free, open-source network operating system based on Debian GNU/Linux. -> It provides routing, firewall, and VPN functionality via a unified CLI using -> `set`/`delete`/`show` command hierarchy. Current rolling release is 1.5.x (circinus). - -VyOS configuration follows a tree structure. All configuration commands start with -`set` (to add/change) or `delete` (to remove). Changes are staged and applied with -`commit`. The CLI hierarchy maps directly to the documentation structure. - -## Quick Start - -- [Quick Start Guide](https://docs.vyos.io/en/latest/quick-start.html): Minimal setup walkthrough -- [CLI Overview](https://docs.vyos.io/en/latest/cli.html): Command-line interface usage - -## Configuration - -- [Firewall](https://docs.vyos.io/en/latest/configuration/firewall/index.html): Zone-based firewall, rules, groups -- [Interfaces](https://docs.vyos.io/en/latest/configuration/interfaces/index.html): Ethernet, bonding, bridge, VLAN, tunnel, wireless -- [Protocols](https://docs.vyos.io/en/latest/configuration/protocols/index.html): BGP, OSPF, IS-IS, static routing, MPLS -- [VPN](https://docs.vyos.io/en/latest/configuration/vpn/index.html): IPsec, OpenVPN, WireGuard, L2TP, PPTP -- [NAT](https://docs.vyos.io/en/latest/configuration/nat/index.html): Source NAT, destination NAT, NAT66 -- [System](https://docs.vyos.io/en/latest/configuration/system/index.html): DNS, NTP, syslog, users, task scheduler -- [High Availability](https://docs.vyos.io/en/latest/configuration/highavailability/index.html): VRRP -- [Load Balancing](https://docs.vyos.io/en/latest/configuration/loadbalancing/index.html): WAN and reverse proxy -- [Containers](https://docs.vyos.io/en/latest/configuration/container/index.html): Podman-based container support -- [PKI](https://docs.vyos.io/en/latest/configuration/pki/index.html): Certificate management -- [Policy](https://docs.vyos.io/en/latest/configuration/policy/index.html): Route maps, prefix lists, access lists -- [Traffic Policy](https://docs.vyos.io/en/latest/configuration/trafficpolicy/index.html): QoS and shaping -- [Service](https://docs.vyos.io/en/latest/configuration/service/index.html): DHCP, DNS forwarding, SNMP, SSH, HTTPS API -- [VRF](https://docs.vyos.io/en/latest/configuration/vrf/index.html): Virtual routing and forwarding - -## Operations - -- [Operational Commands](https://docs.vyos.io/en/latest/operation/index.html): Show, monitor, restart commands - -## Installation - -- [Installation Guide](https://docs.vyos.io/en/latest/installation/index.html): Bare metal, virtual, cloud deployments - -## Automation - -- [Automation](https://docs.vyos.io/en/latest/automation/index.html): Ansible, Terraform, HTTP API, NETCONF - -## Configuration Examples - -- [Blueprints](https://docs.vyos.io/en/latest/configexamples/index.html): Real-world topology examples - -## Optional - -- [Contributing](https://docs.vyos.io/en/latest/contributing/index.html): Development workflow -- [VPP](https://docs.vyos.io/en/latest/vpp/index.html): Vector Packet Processing integration diff --git a/docs/_templates/llms.txt.j2 b/docs/_templates/llms.txt.j2 new file mode 100644 index 00000000..db579e83 --- /dev/null +++ b/docs/_templates/llms.txt.j2 @@ -0,0 +1,52 @@ +# VyOS + +> VyOS is a free, open-source network operating system based on Debian GNU/Linux. +> It provides routing, firewall, and VPN functionality via a unified CLI using +> `set`/`delete`/`show` command hierarchy. This documentation covers {{ release }}. + +VyOS configuration follows a tree structure. All configuration commands start with +`set` (to add/change) or `delete` (to remove). Changes are staged and applied with +`commit`. The CLI hierarchy maps directly to the documentation structure. + +## Quick Start + +- [Quick Start Guide]({{ baseurl }}quick-start.html): Minimal setup walkthrough +- [CLI Overview]({{ baseurl }}cli.html): Command-line interface usage + +## Configuration + +- [Firewall]({{ baseurl }}configuration/firewall/index.html): Zone-based firewall, rules, groups +- [Interfaces]({{ baseurl }}configuration/interfaces/index.html): Ethernet, bonding, bridge, VLAN, tunnel, wireless +- [Protocols]({{ baseurl }}configuration/protocols/index.html): BGP, OSPF, IS-IS, static routing, MPLS +- [VPN]({{ baseurl }}configuration/vpn/index.html): IPsec, OpenVPN, WireGuard, L2TP, PPTP +- [NAT]({{ baseurl }}configuration/nat/index.html): Source NAT, destination NAT, NAT66 +- [System]({{ baseurl }}configuration/system/index.html): DNS, NTP, syslog, users, task scheduler +- [High Availability]({{ baseurl }}configuration/highavailability/index.html): VRRP +- [Load Balancing]({{ baseurl }}configuration/loadbalancing/index.html): WAN and reverse proxy +- [Containers]({{ baseurl }}configuration/container/index.html): Podman-based container support +- [PKI]({{ baseurl }}configuration/pki/index.html): Certificate management +- [Policy]({{ baseurl }}configuration/policy/index.html): Route maps, prefix lists, access lists +- [Traffic Policy]({{ baseurl }}configuration/trafficpolicy/index.html): QoS and shaping +- [Service]({{ baseurl }}configuration/service/index.html): DHCP, DNS forwarding, SNMP, SSH, HTTPS API +- [VRF]({{ baseurl }}configuration/vrf/index.html): Virtual routing and forwarding + +## Operations + +- [Operational Commands]({{ baseurl }}operation/index.html): Show, monitor, restart commands + +## Installation + +- [Installation Guide]({{ baseurl }}installation/index.html): Bare metal, virtual, cloud deployments + +## Automation + +- [Automation]({{ baseurl }}automation/index.html): Ansible, Terraform, HTTP API, NETCONF + +## Configuration Examples + +- [Blueprints]({{ baseurl }}configexamples/index.html): Real-world topology examples + +## Optional + +- [Contributing]({{ baseurl }}contributing/index.html): Development workflow +- [VPP]({{ baseurl }}vpp/index.html): Vector Packet Processing integration diff --git a/docs/conf.py b/docs/conf.py index 1c1014e0..942c25c9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -217,5 +217,21 @@ def _prefer_webp(app): app.builder.supported_image_types = ['image/webp'] + types +def _write_llms_txt(app, exception): + if exception is not None or app.builder.name != 'html': + return + from pathlib import Path + from jinja2 import Template + tpl_path = Path(app.srcdir) / '_templates' / 'llms.txt.j2' + out_path = Path(app.outdir) / 'llms.txt' + baseurl = (app.config.html_baseurl or '').rstrip('/') + '/' + rendered = Template(tpl_path.read_text(encoding='utf-8')).render( + baseurl=baseurl, + release=app.config.release, + ) + out_path.write_text(rendered, encoding='utf-8') + + def setup(app): app.connect('builder-inited', _prefer_webp) + app.connect('build-finished', _write_llms_txt) |
