summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-10 17:27:05 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-10 17:27:05 +0300
commite7a0bebdb5dc4b436b8b610bcb4f01afc33152e0 (patch)
treed9ad6bc834c8e5240c300dff6d47841c2787ce61
parent15855844e1fe5b0bd39b020639f4c08c69d24864 (diff)
downloadvyos-documentation-e7a0bebdb5dc4b436b8b610bcb4f01afc33152e0.tar.gz
vyos-documentation-e7a0bebdb5dc4b436b8b610bcb4f01afc33152e0.zip
chore: remove RST swap mechanism, archive rst-*.rst under docs/_rst_legacy/
The swap mechanism (RST-as-fallback for migrated MD pages) is dormant — docs/_rst_overrides.txt has been empty since the MyST flip trio landed. The mechanism's surface area is dead weight and the rst-*.rst shadows scattered across the source tree cause Context7's parser to misclassify the project as RST. Sibling PRs: - yuriy/remove-rst-swap-mechanism (rolling) - yuriy/remove-rst-swap-mechanism-circinus Changes: - Move 210 rst-*.rst shadow files into docs/_rst_legacy/ preserving subdirectory structure. They remain in the repo for reference; Sphinx excludes the folder via exclude_patterns. - Strip swap_sources.py invocation from docs/Makefile. - Strip rst-*.rst exclude entry and the _md_exclude.txt loader from docs/conf.py; replace with a single _rst_legacy exclude. - Delete scripts/swap_sources.py, tests/test_swap_sources.py, docs/_rst_overrides.txt. - Update AGENTS.md: drop the "RST override mechanism" section and the test-runner snippet for the deleted test. Note: .readthedocs.yml on sagitta has no jobs: block to remove (the swap was wired only at build-time via the Makefile chain on this branch). Verified: sphinx-build -b html with --keep-going produces identical warning set (409 unique — pre-existing cli.rst/aws.rst title-level warnings on this branch), identical sitemap entry count (215), identical llms.txt entry count (23), zero rst-* URLs in any artifact. 🤖 Generated by [robots](https://vyos.io)
-rw-r--r--AGENTS.md43
-rw-r--r--docs/Makefile30
-rw-r--r--docs/_rst_legacy/automation/rst-cloud-init.rst (renamed from docs/automation/rst-cloud-init.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-command-scripting.rst (renamed from docs/automation/rst-command-scripting.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-index.rst (renamed from docs/automation/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-vyos-ansible.rst (renamed from docs/automation/rst-vyos-ansible.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-vyos-api.rst (renamed from docs/automation/rst-vyos-api.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-vyos-napalm.rst (renamed from docs/automation/rst-vyos-napalm.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-vyos-netmiko.rst (renamed from docs/automation/rst-vyos-netmiko.rst)0
-rw-r--r--docs/_rst_legacy/automation/rst-vyos-salt.rst (renamed from docs/automation/rst-vyos-salt.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-index.rst (renamed from docs/automation/terraform/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-terraformAWS.rst (renamed from docs/automation/terraform/rst-terraformAWS.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-terraformAZ.rst (renamed from docs/automation/terraform/rst-terraformAZ.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-terraformGoogle.rst (renamed from docs/automation/terraform/rst-terraformGoogle.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-terraformvSphere.rst (renamed from docs/automation/terraform/rst-terraformvSphere.rst)0
-rw-r--r--docs/_rst_legacy/automation/terraform/rst-terraformvyos.rst (renamed from docs/automation/terraform/rst-terraformvyos.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.1.rst (renamed from docs/changelog/rst-1.2.1.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.2.rst (renamed from docs/changelog/rst-1.2.2.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.3.rst (renamed from docs/changelog/rst-1.2.3.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.4.rst (renamed from docs/changelog/rst-1.2.4.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.5.rst (renamed from docs/changelog/rst-1.2.5.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.2.6.rst (renamed from docs/changelog/rst-1.2.6.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.3.rst (renamed from docs/changelog/rst-1.3.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.4.rst (renamed from docs/changelog/rst-1.4.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-1.5.rst (renamed from docs/changelog/rst-1.5.rst)0
-rw-r--r--docs/_rst_legacy/changelog/rst-index.rst (renamed from docs/changelog/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst (renamed from docs/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst (renamed from docs/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst (renamed from docs/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/autotest/Wireguard/rst-Wireguard.rst (renamed from docs/configexamples/autotest/Wireguard/rst-Wireguard.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst (renamed from docs/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-azure-vpn-bgp.rst (renamed from docs/configexamples/rst-azure-vpn-bgp.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-azure-vpn-dual-bgp.rst (renamed from docs/configexamples/rst-azure-vpn-dual-bgp.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-bgp-ipv6-unnumbered.rst (renamed from docs/configexamples/rst-bgp-ipv6-unnumbered.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-firewall.rst (renamed from docs/configexamples/rst-firewall.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-fwall-and-vrf.rst (renamed from docs/configexamples/rst-fwall-and-vrf.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-ha.rst (renamed from docs/configexamples/rst-ha.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-index.rst (renamed from docs/configexamples/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-inter-vrf-routing-vrf-lite.rst (renamed from docs/configexamples/rst-inter-vrf-routing-vrf-lite.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-ipsec-cisco-policy-based.rst (renamed from docs/configexamples/rst-ipsec-cisco-policy-based.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-ipsec-cisco-route-based.rst (renamed from docs/configexamples/rst-ipsec-cisco-route-based.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-ipsec-pa-route-based.rst (renamed from docs/configexamples/rst-ipsec-pa-route-based.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-l3vpn-hub-and-spoke.rst (renamed from docs/configexamples/rst-l3vpn-hub-and-spoke.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-lac-lns.rst (renamed from docs/configexamples/rst-lac-lns.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-nmp.rst (renamed from docs/configexamples/rst-nmp.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-ospf-unnumbered.rst (renamed from docs/configexamples/rst-ospf-unnumbered.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-pppoe-ipv6-basic.rst (renamed from docs/configexamples/rst-pppoe-ipv6-basic.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-qos.rst (renamed from docs/configexamples/rst-qos.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-segment-routing-isis.rst (renamed from docs/configexamples/rst-segment-routing-isis.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-wan-load-balancing.rst (renamed from docs/configexamples/rst-wan-load-balancing.rst)0
-rw-r--r--docs/_rst_legacy/configexamples/rst-zone-policy.rst (renamed from docs/configexamples/rst-zone-policy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/container/rst-index.rst (renamed from docs/configuration/container/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-bridge.rst (renamed from docs/configuration/firewall/rst-bridge.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-flowtables.rst (renamed from docs/configuration/firewall/rst-flowtables.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-global-options.rst (renamed from docs/configuration/firewall/rst-global-options.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-groups.rst (renamed from docs/configuration/firewall/rst-groups.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-index.rst (renamed from docs/configuration/firewall/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-ipv4.rst (renamed from docs/configuration/firewall/rst-ipv4.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-ipv6.rst (renamed from docs/configuration/firewall/rst-ipv6.rst)0
-rw-r--r--docs/_rst_legacy/configuration/firewall/rst-zone.rst (renamed from docs/configuration/firewall/rst-zone.rst)0
-rw-r--r--docs/_rst_legacy/configuration/highavailability/rst-index.rst (renamed from docs/configuration/highavailability/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-bonding.rst (renamed from docs/configuration/interfaces/rst-bonding.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-bridge.rst (renamed from docs/configuration/interfaces/rst-bridge.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-dummy.rst (renamed from docs/configuration/interfaces/rst-dummy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-ethernet.rst (renamed from docs/configuration/interfaces/rst-ethernet.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-geneve.rst (renamed from docs/configuration/interfaces/rst-geneve.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-index.rst (renamed from docs/configuration/interfaces/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-l2tpv3.rst (renamed from docs/configuration/interfaces/rst-l2tpv3.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-loopback.rst (renamed from docs/configuration/interfaces/rst-loopback.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-macsec.rst (renamed from docs/configuration/interfaces/rst-macsec.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-openvpn.rst (renamed from docs/configuration/interfaces/rst-openvpn.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-pppoe.rst (renamed from docs/configuration/interfaces/rst-pppoe.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-pseudo-ethernet.rst (renamed from docs/configuration/interfaces/rst-pseudo-ethernet.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-sstp-client.rst (renamed from docs/configuration/interfaces/rst-sstp-client.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-tunnel.rst (renamed from docs/configuration/interfaces/rst-tunnel.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-virtual-ethernet.rst (renamed from docs/configuration/interfaces/rst-virtual-ethernet.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-vti.rst (renamed from docs/configuration/interfaces/rst-vti.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-vxlan.rst (renamed from docs/configuration/interfaces/rst-vxlan.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-wireguard.rst (renamed from docs/configuration/interfaces/rst-wireguard.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-wireless.rst (renamed from docs/configuration/interfaces/rst-wireless.rst)0
-rw-r--r--docs/_rst_legacy/configuration/interfaces/rst-wwan.rst (renamed from docs/configuration/interfaces/rst-wwan.rst)0
-rw-r--r--docs/_rst_legacy/configuration/loadbalancing/rst-index.rst (renamed from docs/configuration/loadbalancing/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/loadbalancing/rst-reverse-proxy.rst (renamed from docs/configuration/loadbalancing/rst-reverse-proxy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/loadbalancing/rst-wan.rst (renamed from docs/configuration/loadbalancing/rst-wan.rst)0
-rw-r--r--docs/_rst_legacy/configuration/nat/rst-index.rst (renamed from docs/configuration/nat/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/nat/rst-nat44.rst (renamed from docs/configuration/nat/rst-nat44.rst)0
-rw-r--r--docs/_rst_legacy/configuration/nat/rst-nat64.rst (renamed from docs/configuration/nat/rst-nat64.rst)0
-rw-r--r--docs/_rst_legacy/configuration/nat/rst-nat66.rst (renamed from docs/configuration/nat/rst-nat66.rst)0
-rw-r--r--docs/_rst_legacy/configuration/pki/rst-index.rst (renamed from docs/configuration/pki/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-access-list.rst (renamed from docs/configuration/policy/rst-access-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-as-path-list.rst (renamed from docs/configuration/policy/rst-as-path-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-community-list.rst (renamed from docs/configuration/policy/rst-community-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-examples.rst (renamed from docs/configuration/policy/rst-examples.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-extcommunity-list.rst (renamed from docs/configuration/policy/rst-extcommunity-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-index.rst (renamed from docs/configuration/policy/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-large-community-list.rst (renamed from docs/configuration/policy/rst-large-community-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-local-route.rst (renamed from docs/configuration/policy/rst-local-route.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-prefix-list.rst (renamed from docs/configuration/policy/rst-prefix-list.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-route-map.rst (renamed from docs/configuration/policy/rst-route-map.rst)0
-rw-r--r--docs/_rst_legacy/configuration/policy/rst-route.rst (renamed from docs/configuration/policy/rst-route.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-babel.rst (renamed from docs/configuration/protocols/rst-babel.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-bfd.rst (renamed from docs/configuration/protocols/rst-bfd.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-bgp.rst (renamed from docs/configuration/protocols/rst-bgp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-failover.rst (renamed from docs/configuration/protocols/rst-failover.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-igmp-proxy.rst (renamed from docs/configuration/protocols/rst-igmp-proxy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-index.rst (renamed from docs/configuration/protocols/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-isis.rst (renamed from docs/configuration/protocols/rst-isis.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-mpls.rst (renamed from docs/configuration/protocols/rst-mpls.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-ospf.rst (renamed from docs/configuration/protocols/rst-ospf.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-pim.rst (renamed from docs/configuration/protocols/rst-pim.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-pim6.rst (renamed from docs/configuration/protocols/rst-pim6.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-rip.rst (renamed from docs/configuration/protocols/rst-rip.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-rpki.rst (renamed from docs/configuration/protocols/rst-rpki.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-segment-routing.rst (renamed from docs/configuration/protocols/rst-segment-routing.rst)0
-rw-r--r--docs/_rst_legacy/configuration/protocols/rst-static.rst (renamed from docs/configuration/protocols/rst-static.rst)0
-rw-r--r--docs/_rst_legacy/configuration/rst-index.rst (renamed from docs/configuration/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-broadcast-relay.rst (renamed from docs/configuration/service/rst-broadcast-relay.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-config-sync.rst (renamed from docs/configuration/service/rst-config-sync.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-conntrack-sync.rst (renamed from docs/configuration/service/rst-conntrack-sync.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-console-server.rst (renamed from docs/configuration/service/rst-console-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-dhcp-relay.rst (renamed from docs/configuration/service/rst-dhcp-relay.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-dhcp-server.rst (renamed from docs/configuration/service/rst-dhcp-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-dns.rst (renamed from docs/configuration/service/rst-dns.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-eventhandler.rst (renamed from docs/configuration/service/rst-eventhandler.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-https.rst (renamed from docs/configuration/service/rst-https.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-ids.rst (renamed from docs/configuration/service/rst-ids.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-index.rst (renamed from docs/configuration/service/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-ipoe-server.rst (renamed from docs/configuration/service/rst-ipoe-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-lldp.rst (renamed from docs/configuration/service/rst-lldp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-mdns.rst (renamed from docs/configuration/service/rst-mdns.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-monitoring.rst (renamed from docs/configuration/service/rst-monitoring.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-ntp.rst (renamed from docs/configuration/service/rst-ntp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-pppoe-server.rst (renamed from docs/configuration/service/rst-pppoe-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-router-advert.rst (renamed from docs/configuration/service/rst-router-advert.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-salt-minion.rst (renamed from docs/configuration/service/rst-salt-minion.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-snmp.rst (renamed from docs/configuration/service/rst-snmp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-ssh.rst (renamed from docs/configuration/service/rst-ssh.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-tftp-server.rst (renamed from docs/configuration/service/rst-tftp-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/service/rst-webproxy.rst (renamed from docs/configuration/service/rst-webproxy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-acceleration.rst (renamed from docs/configuration/system/rst-acceleration.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-conntrack.rst (renamed from docs/configuration/system/rst-conntrack.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-console.rst (renamed from docs/configuration/system/rst-console.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-default-route.rst (renamed from docs/configuration/system/rst-default-route.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-flow-accounting.rst (renamed from docs/configuration/system/rst-flow-accounting.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-frr.rst (renamed from docs/configuration/system/rst-frr.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-host-name.rst (renamed from docs/configuration/system/rst-host-name.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-index.rst (renamed from docs/configuration/system/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-ip.rst (renamed from docs/configuration/system/rst-ip.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-ipv6.rst (renamed from docs/configuration/system/rst-ipv6.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-lcd.rst (renamed from docs/configuration/system/rst-lcd.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-login.rst (renamed from docs/configuration/system/rst-login.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-name-server.rst (renamed from docs/configuration/system/rst-name-server.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-option.rst (renamed from docs/configuration/system/rst-option.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-proxy.rst (renamed from docs/configuration/system/rst-proxy.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-sflow.rst (renamed from docs/configuration/system/rst-sflow.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-sysctl.rst (renamed from docs/configuration/system/rst-sysctl.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-syslog.rst (renamed from docs/configuration/system/rst-syslog.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-task-scheduler.rst (renamed from docs/configuration/system/rst-task-scheduler.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-time-zone.rst (renamed from docs/configuration/system/rst-time-zone.rst)0
-rw-r--r--docs/_rst_legacy/configuration/system/rst-updates.rst (renamed from docs/configuration/system/rst-updates.rst)0
-rw-r--r--docs/_rst_legacy/configuration/trafficpolicy/rst-index.rst (renamed from docs/configuration/trafficpolicy/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/ipsec/rst-index.rst (renamed from docs/configuration/vpn/ipsec/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/ipsec/rst-ipsec_general.rst (renamed from docs/configuration/vpn/ipsec/rst-ipsec_general.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst (renamed from docs/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/ipsec/rst-site2site_ipsec.rst (renamed from docs/configuration/vpn/ipsec/rst-site2site_ipsec.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst (renamed from docs/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-dmvpn.rst (renamed from docs/configuration/vpn/rst-dmvpn.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-index.rst (renamed from docs/configuration/vpn/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-l2tp.rst (renamed from docs/configuration/vpn/rst-l2tp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-openconnect.rst (renamed from docs/configuration/vpn/rst-openconnect.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-pptp.rst (renamed from docs/configuration/vpn/rst-pptp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-rsa-keys.rst (renamed from docs/configuration/vpn/rst-rsa-keys.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vpn/rst-sstp.rst (renamed from docs/configuration/vpn/rst-sstp.rst)0
-rw-r--r--docs/_rst_legacy/configuration/vrf/rst-index.rst (renamed from docs/configuration/vrf/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-build-vyos.rst (renamed from docs/contributing/rst-build-vyos.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-debugging.rst (renamed from docs/contributing/rst-debugging.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-development.rst (renamed from docs/contributing/rst-development.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-issues-features.rst (renamed from docs/contributing/rst-issues-features.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-testing.rst (renamed from docs/contributing/rst-testing.rst)0
-rw-r--r--docs/_rst_legacy/contributing/rst-upstream-packages.rst (renamed from docs/contributing/rst-upstream-packages.rst)0
-rwxr-xr-xdocs/_rst_legacy/installation/cloud/rst-aws-ha.rst (renamed from docs/installation/cloud/rst-aws-ha.rst)0
-rwxr-xr-xdocs/_rst_legacy/installation/cloud/rst-aws-to-azure.rst (renamed from docs/installation/cloud/rst-aws-to-azure.rst)0
-rwxr-xr-xdocs/_rst_legacy/installation/cloud/rst-azure-ha.rst (renamed from docs/installation/cloud/rst-azure-ha.rst)0
-rw-r--r--docs/_rst_legacy/installation/cloud/rst-azure.rst (renamed from docs/installation/cloud/rst-azure.rst)0
-rw-r--r--docs/_rst_legacy/installation/cloud/rst-gcp.rst (renamed from docs/installation/cloud/rst-gcp.rst)0
-rw-r--r--docs/_rst_legacy/installation/cloud/rst-index.rst (renamed from docs/installation/cloud/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/installation/cloud/rst-oracel.rst (renamed from docs/installation/cloud/rst-oracel.rst)0
-rw-r--r--docs/_rst_legacy/installation/rst-image.rst (renamed from docs/installation/rst-image.rst)0
-rw-r--r--docs/_rst_legacy/installation/rst-index.rst (renamed from docs/installation/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/installation/rst-install.rst (renamed from docs/installation/rst-install.rst)0
-rw-r--r--docs/_rst_legacy/installation/rst-update.rst (renamed from docs/installation/rst-update.rst)0
-rw-r--r--docs/_rst_legacy/installation/rst-vyos-on-baremetal.rst (renamed from docs/installation/rst-vyos-on-baremetal.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-docker.rst (renamed from docs/installation/virtual/rst-docker.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-eve-ng.rst (renamed from docs/installation/virtual/rst-eve-ng.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-gns3.rst (renamed from docs/installation/virtual/rst-gns3.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-index.rst (renamed from docs/installation/virtual/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-libvirt.rst (renamed from docs/installation/virtual/rst-libvirt.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-proxmox.rst (renamed from docs/installation/virtual/rst-proxmox.rst)0
-rw-r--r--docs/_rst_legacy/installation/virtual/rst-vmware.rst (renamed from docs/installation/virtual/rst-vmware.rst)0
-rw-r--r--docs/_rst_legacy/introducing/rst-about.rst (renamed from docs/introducing/rst-about.rst)0
-rw-r--r--docs/_rst_legacy/introducing/rst-history.rst (renamed from docs/introducing/rst-history.rst)0
-rw-r--r--docs/_rst_legacy/operation/rst-boot-options.rst (renamed from docs/operation/rst-boot-options.rst)0
-rw-r--r--docs/_rst_legacy/operation/rst-index.rst (renamed from docs/operation/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/operation/rst-information.rst (renamed from docs/operation/rst-information.rst)0
-rwxr-xr-xdocs/_rst_legacy/operation/rst-password-recovery.rst (renamed from docs/operation/rst-password-recovery.rst)0
-rw-r--r--docs/_rst_legacy/operation/rst-raid.rst (renamed from docs/operation/rst-raid.rst)0
-rw-r--r--docs/_rst_legacy/rst-404.rst (renamed from docs/rst-404.rst)0
-rw-r--r--docs/_rst_legacy/rst-coverage.rst (renamed from docs/rst-coverage.rst)0
-rw-r--r--docs/_rst_legacy/rst-documentation.rst (renamed from docs/rst-documentation.rst)0
-rw-r--r--docs/_rst_legacy/rst-index.rst (renamed from docs/rst-index.rst)0
-rw-r--r--docs/_rst_legacy/rst-quick-start.rst (renamed from docs/rst-quick-start.rst)0
-rw-r--r--docs/_rst_legacy/troubleshooting/rst-index.rst (renamed from docs/troubleshooting/rst-index.rst)0
-rw-r--r--docs/_rst_overrides.txt7
-rw-r--r--docs/conf.py10
-rw-r--r--scripts/swap_sources.py344
-rw-r--r--tests/test_swap_sources.py245
216 files changed, 18 insertions, 661 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 9b4cf05e..462b47c9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -4,9 +4,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project
-VyOS user documentation, built with Sphinx and hosted on Read the Docs at https://docs.vyos.io. Sources are MyST Markdown (`.md`) for migrated pages and RST (`.rst`) for the rest. Both formats are first-class to Sphinx; MD is the canonical source for any page that has been migrated, and RST is the canonical source for pages that haven't.
+VyOS user documentation, built with Sphinx and hosted on Read the Docs at https://docs.vyos.io. Sources are MyST Markdown (`.md`) for migrated pages and RST (`.rst`) for pages that haven't been migrated yet. Both formats are first-class to Sphinx.
-A small swap mechanism exists for the rare case where a maintainer needs to render the legacy RST version of a page that already has an MD primary — see `RST override mechanism` below. The override list is empty by default.
+Pre-migration RST shadows of migrated pages are archived under `docs/_rst_legacy/` for reference only — they are excluded from the build and not consulted by Sphinx.
## Build
@@ -29,17 +29,6 @@ cd docs && make html
Output: `docs/_build/html/`.
-## Tests
-
-`tests/test_swap_sources.py` imports `swap_sources` from `scripts/`, which is
-not on `PYTHONPATH` by default. Run from the `tests/` directory:
-
-```bash
-cd tests
-PYTHONPATH=../scripts python -m pytest # all tests
-PYTHONPATH=../scripts python -m pytest test_swap_sources.py # single file
-```
-
## Lint
The repo doesn't ship a local lint config or pin a linter binary. CI runs
@@ -83,35 +72,17 @@ Mergify is configured at the org level (no `.mergify.yml` in the repo). The PR t
- `testcoverage.py` — standalone helper that reads VyOS XML command definitions and exposes coverage stats; not a Sphinx extension.
- `releasenotes.py` — standalone release-notes/changelog generator script; not a Sphinx extension.
-### RST override mechanism
+### Source files
-For pages that have been migrated from RST to MyST:
-
-- `docs/<subdir>/<page>.md` — canonical MD source (primary).
-- `docs/<subdir>/rst-<page>.rst` — preserved RST sibling kept around as an override
- option. The `rst-` prefix applies only to the **filename**, not the directory, so
- `configuration/firewall/zone` maps to `docs/configuration/firewall/rst-zone.rst`
- (not `docs/rst-configuration/firewall/zone.rst`). Excluded from the build by
- `exclude_patterns` in `conf.py`.
-- `docs/_rst_overrides.txt` — one stem per line, relative to `docs/` (e.g.
- `configuration/firewall/zone`). Pages listed here render from
- `rst-<page>.rst` instead of `<page>.md`. Empty by default.
-- `scripts/swap_sources.py` — CLI for `--swap` (apply overrides), `--restore`,
- `--dry-run`, `--status`. Build-time state lands in
- `docs/_build/_rst_override_state.json` and `docs/_build/_md_exclude.txt`
- (gitignored).
-
-For pages that have NOT been migrated:
-
-- `docs/<page>.rst` — original RST, no `rst-` prefix, no MD sibling.
+- `docs/<subdir>/<page>.md` — canonical MD source for migrated pages.
+- `docs/<page>.rst` — canonical RST source for pages that have not been migrated yet (no `rst-` prefix, no MD sibling).
+- `docs/_rst_legacy/<subdir>/rst-<page>.rst` — archived pre-migration RST shadows. Excluded from the Sphinx build and from the Context7 index. Reference only.
**Editing rules:**
-- Migrated page (has `<page>.md`): edit the `.md`. Don't touch the `rst-`-prefixed sibling unless you're maintaining a parallel RST version that someone has flagged in `_rst_overrides.txt`.
+- Migrated page (has `<page>.md`): edit the `.md`. Do not touch the archived shadow under `_rst_legacy/`.
- Non-migrated page (RST-only): edit the `.rst`.
- New page: write it as `.md` from the start. The `md-` prefix that earlier MyST migration commits used is gone — never add it.
-Running `make html` runs the swap automatically (it's a no-op when the override list is empty, which is the default state).
-
### Command directives
`.. cfgcmd::`, `.. opcmd::`, and `.. cmdinclude::` are the VyOS-specific Sphinx directives in RST. They are tracked for command coverage — do **not** convert them to plain `.. code-block::`. In MyST the same directives are written as fenced blocks: ```` ```{cfgcmd} set system ... ```` (enabled by `myst_fence_as_directive`). The MyST include directive is named `cmdincludemd` (not `cmdinclude`) so that template parsing follows MyST rules in MD pages and RST rules in RST pages — pick `cmdinclude` in `.rst`, `cmdincludemd` in `.md`.
diff --git a/docs/Makefile b/docs/Makefile
index ae12b802..542c49b6 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -12,35 +12,23 @@ AUTOHOST = 0.0.0.0
AUTOPORT = 8000
AUTOOPTS = --watch .
-SWAP = python3 ../scripts/swap_sources.py
-
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-.PHONY: help Makefile swap restore html dirhtml pdf livehtml defaultvalue
-
-swap:
- $(SWAP) --swap
-
-restore:
- $(SWAP) --restore
+.PHONY: help Makefile html dirhtml pdf livehtml defaultvalue
-html: swap
- @trap '$(SWAP) --restore' EXIT; \
- $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+html:
+ $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-dirhtml: swap
- @trap '$(SWAP) --restore' EXIT; \
- $(SPHINXBUILD) -M dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+dirhtml:
+ $(SPHINXBUILD) -M dirhtml "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-pdf: swap
- @trap '$(SWAP) --restore' EXIT; \
- $(SPHINXBUILD) -M latexpdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+pdf:
+ $(SPHINXBUILD) -M latexpdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-livehtml: swap
- @trap '$(SWAP) --restore' EXIT; \
- sphinx-autobuild --host $(AUTOHOST) --port $(AUTOPORT) \
+livehtml:
+ sphinx-autobuild --host $(AUTOHOST) --port $(AUTOPORT) \
--ignore '$(BUILDDIR)/**' \
--ignore '**/_build/**' \
--ignore '**/md-*' \
diff --git a/docs/automation/rst-cloud-init.rst b/docs/_rst_legacy/automation/rst-cloud-init.rst
index 20b6dc49..20b6dc49 100644
--- a/docs/automation/rst-cloud-init.rst
+++ b/docs/_rst_legacy/automation/rst-cloud-init.rst
diff --git a/docs/automation/rst-command-scripting.rst b/docs/_rst_legacy/automation/rst-command-scripting.rst
index aaa60957..aaa60957 100644
--- a/docs/automation/rst-command-scripting.rst
+++ b/docs/_rst_legacy/automation/rst-command-scripting.rst
diff --git a/docs/automation/rst-index.rst b/docs/_rst_legacy/automation/rst-index.rst
index 0c334d86..0c334d86 100644
--- a/docs/automation/rst-index.rst
+++ b/docs/_rst_legacy/automation/rst-index.rst
diff --git a/docs/automation/rst-vyos-ansible.rst b/docs/_rst_legacy/automation/rst-vyos-ansible.rst
index 0ebcb924..0ebcb924 100644
--- a/docs/automation/rst-vyos-ansible.rst
+++ b/docs/_rst_legacy/automation/rst-vyos-ansible.rst
diff --git a/docs/automation/rst-vyos-api.rst b/docs/_rst_legacy/automation/rst-vyos-api.rst
index 60247fae..60247fae 100644
--- a/docs/automation/rst-vyos-api.rst
+++ b/docs/_rst_legacy/automation/rst-vyos-api.rst
diff --git a/docs/automation/rst-vyos-napalm.rst b/docs/_rst_legacy/automation/rst-vyos-napalm.rst
index 75e20b3c..75e20b3c 100644
--- a/docs/automation/rst-vyos-napalm.rst
+++ b/docs/_rst_legacy/automation/rst-vyos-napalm.rst
diff --git a/docs/automation/rst-vyos-netmiko.rst b/docs/_rst_legacy/automation/rst-vyos-netmiko.rst
index 075b0f34..075b0f34 100644
--- a/docs/automation/rst-vyos-netmiko.rst
+++ b/docs/_rst_legacy/automation/rst-vyos-netmiko.rst
diff --git a/docs/automation/rst-vyos-salt.rst b/docs/_rst_legacy/automation/rst-vyos-salt.rst
index 12be32a1..12be32a1 100644
--- a/docs/automation/rst-vyos-salt.rst
+++ b/docs/_rst_legacy/automation/rst-vyos-salt.rst
diff --git a/docs/automation/terraform/rst-index.rst b/docs/_rst_legacy/automation/terraform/rst-index.rst
index 42af58bd..42af58bd 100644
--- a/docs/automation/terraform/rst-index.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-index.rst
diff --git a/docs/automation/terraform/rst-terraformAWS.rst b/docs/_rst_legacy/automation/terraform/rst-terraformAWS.rst
index e068377d..e068377d 100644
--- a/docs/automation/terraform/rst-terraformAWS.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-terraformAWS.rst
diff --git a/docs/automation/terraform/rst-terraformAZ.rst b/docs/_rst_legacy/automation/terraform/rst-terraformAZ.rst
index a0fea023..a0fea023 100644
--- a/docs/automation/terraform/rst-terraformAZ.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-terraformAZ.rst
diff --git a/docs/automation/terraform/rst-terraformGoogle.rst b/docs/_rst_legacy/automation/terraform/rst-terraformGoogle.rst
index e69de29b..e69de29b 100644
--- a/docs/automation/terraform/rst-terraformGoogle.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-terraformGoogle.rst
diff --git a/docs/automation/terraform/rst-terraformvSphere.rst b/docs/_rst_legacy/automation/terraform/rst-terraformvSphere.rst
index 5d39261b..5d39261b 100644
--- a/docs/automation/terraform/rst-terraformvSphere.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-terraformvSphere.rst
diff --git a/docs/automation/terraform/rst-terraformvyos.rst b/docs/_rst_legacy/automation/terraform/rst-terraformvyos.rst
index 42dc7492..42dc7492 100644
--- a/docs/automation/terraform/rst-terraformvyos.rst
+++ b/docs/_rst_legacy/automation/terraform/rst-terraformvyos.rst
diff --git a/docs/changelog/rst-1.2.1.rst b/docs/_rst_legacy/changelog/rst-1.2.1.rst
index 4f22dd0a..4f22dd0a 100644
--- a/docs/changelog/rst-1.2.1.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.1.rst
diff --git a/docs/changelog/rst-1.2.2.rst b/docs/_rst_legacy/changelog/rst-1.2.2.rst
index 17ba941f..17ba941f 100644
--- a/docs/changelog/rst-1.2.2.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.2.rst
diff --git a/docs/changelog/rst-1.2.3.rst b/docs/_rst_legacy/changelog/rst-1.2.3.rst
index 653beec1..653beec1 100644
--- a/docs/changelog/rst-1.2.3.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.3.rst
diff --git a/docs/changelog/rst-1.2.4.rst b/docs/_rst_legacy/changelog/rst-1.2.4.rst
index 3e228880..3e228880 100644
--- a/docs/changelog/rst-1.2.4.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.4.rst
diff --git a/docs/changelog/rst-1.2.5.rst b/docs/_rst_legacy/changelog/rst-1.2.5.rst
index 438e84f2..438e84f2 100644
--- a/docs/changelog/rst-1.2.5.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.5.rst
diff --git a/docs/changelog/rst-1.2.6.rst b/docs/_rst_legacy/changelog/rst-1.2.6.rst
index 70786d07..70786d07 100644
--- a/docs/changelog/rst-1.2.6.rst
+++ b/docs/_rst_legacy/changelog/rst-1.2.6.rst
diff --git a/docs/changelog/rst-1.3.rst b/docs/_rst_legacy/changelog/rst-1.3.rst
index dc1b4620..dc1b4620 100644
--- a/docs/changelog/rst-1.3.rst
+++ b/docs/_rst_legacy/changelog/rst-1.3.rst
diff --git a/docs/changelog/rst-1.4.rst b/docs/_rst_legacy/changelog/rst-1.4.rst
index 0ad129e1..0ad129e1 100644
--- a/docs/changelog/rst-1.4.rst
+++ b/docs/_rst_legacy/changelog/rst-1.4.rst
diff --git a/docs/changelog/rst-1.5.rst b/docs/_rst_legacy/changelog/rst-1.5.rst
index 206d5bde..206d5bde 100644
--- a/docs/changelog/rst-1.5.rst
+++ b/docs/_rst_legacy/changelog/rst-1.5.rst
diff --git a/docs/changelog/rst-index.rst b/docs/_rst_legacy/changelog/rst-index.rst
index 9467a716..9467a716 100644
--- a/docs/changelog/rst-index.rst
+++ b/docs/_rst_legacy/changelog/rst-index.rst
diff --git a/docs/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst b/docs/_rst_legacy/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst
index 77f9b118..77f9b118 100644
--- a/docs/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst
+++ b/docs/_rst_legacy/configexamples/autotest/DHCPRelay_through_GRE/rst-DHCPRelay_through_GRE.rst
diff --git a/docs/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst b/docs/_rst_legacy/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst
index 2a528852..2a528852 100644
--- a/docs/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst
+++ b/docs/_rst_legacy/configexamples/autotest/L3VPN_EVPN/rst-L3VPN_EVPN.rst
diff --git a/docs/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst b/docs/_rst_legacy/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst
index 6666399d..6666399d 100644
--- a/docs/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst
+++ b/docs/_rst_legacy/configexamples/autotest/OpenVPN_with_LDAP/rst-OpenVPN_with_LDAP.rst
diff --git a/docs/configexamples/autotest/Wireguard/rst-Wireguard.rst b/docs/_rst_legacy/configexamples/autotest/Wireguard/rst-Wireguard.rst
index 93092afe..93092afe 100644
--- a/docs/configexamples/autotest/Wireguard/rst-Wireguard.rst
+++ b/docs/_rst_legacy/configexamples/autotest/Wireguard/rst-Wireguard.rst
diff --git a/docs/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst b/docs/_rst_legacy/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst
index 4a822b04..4a822b04 100644
--- a/docs/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst
+++ b/docs/_rst_legacy/configexamples/autotest/tunnelbroker/rst-tunnelbroker.rst
diff --git a/docs/configexamples/rst-azure-vpn-bgp.rst b/docs/_rst_legacy/configexamples/rst-azure-vpn-bgp.rst
index f272aafd..f272aafd 100644
--- a/docs/configexamples/rst-azure-vpn-bgp.rst
+++ b/docs/_rst_legacy/configexamples/rst-azure-vpn-bgp.rst
diff --git a/docs/configexamples/rst-azure-vpn-dual-bgp.rst b/docs/_rst_legacy/configexamples/rst-azure-vpn-dual-bgp.rst
index d019092c..d019092c 100644
--- a/docs/configexamples/rst-azure-vpn-dual-bgp.rst
+++ b/docs/_rst_legacy/configexamples/rst-azure-vpn-dual-bgp.rst
diff --git a/docs/configexamples/rst-bgp-ipv6-unnumbered.rst b/docs/_rst_legacy/configexamples/rst-bgp-ipv6-unnumbered.rst
index f7a530d8..f7a530d8 100644
--- a/docs/configexamples/rst-bgp-ipv6-unnumbered.rst
+++ b/docs/_rst_legacy/configexamples/rst-bgp-ipv6-unnumbered.rst
diff --git a/docs/configexamples/rst-firewall.rst b/docs/_rst_legacy/configexamples/rst-firewall.rst
index e0a4ca55..e0a4ca55 100644
--- a/docs/configexamples/rst-firewall.rst
+++ b/docs/_rst_legacy/configexamples/rst-firewall.rst
diff --git a/docs/configexamples/rst-fwall-and-vrf.rst b/docs/_rst_legacy/configexamples/rst-fwall-and-vrf.rst
index 38663a18..38663a18 100644
--- a/docs/configexamples/rst-fwall-and-vrf.rst
+++ b/docs/_rst_legacy/configexamples/rst-fwall-and-vrf.rst
diff --git a/docs/configexamples/rst-ha.rst b/docs/_rst_legacy/configexamples/rst-ha.rst
index 1ceda8e9..1ceda8e9 100644
--- a/docs/configexamples/rst-ha.rst
+++ b/docs/_rst_legacy/configexamples/rst-ha.rst
diff --git a/docs/configexamples/rst-index.rst b/docs/_rst_legacy/configexamples/rst-index.rst
index 0b585972..0b585972 100644
--- a/docs/configexamples/rst-index.rst
+++ b/docs/_rst_legacy/configexamples/rst-index.rst
diff --git a/docs/configexamples/rst-inter-vrf-routing-vrf-lite.rst b/docs/_rst_legacy/configexamples/rst-inter-vrf-routing-vrf-lite.rst
index 0e442ab3..0e442ab3 100644
--- a/docs/configexamples/rst-inter-vrf-routing-vrf-lite.rst
+++ b/docs/_rst_legacy/configexamples/rst-inter-vrf-routing-vrf-lite.rst
diff --git a/docs/configexamples/rst-ipsec-cisco-policy-based.rst b/docs/_rst_legacy/configexamples/rst-ipsec-cisco-policy-based.rst
index 787c1140..787c1140 100644
--- a/docs/configexamples/rst-ipsec-cisco-policy-based.rst
+++ b/docs/_rst_legacy/configexamples/rst-ipsec-cisco-policy-based.rst
diff --git a/docs/configexamples/rst-ipsec-cisco-route-based.rst b/docs/_rst_legacy/configexamples/rst-ipsec-cisco-route-based.rst
index f7c3cb08..f7c3cb08 100644
--- a/docs/configexamples/rst-ipsec-cisco-route-based.rst
+++ b/docs/_rst_legacy/configexamples/rst-ipsec-cisco-route-based.rst
diff --git a/docs/configexamples/rst-ipsec-pa-route-based.rst b/docs/_rst_legacy/configexamples/rst-ipsec-pa-route-based.rst
index b6f6f3a7..b6f6f3a7 100644
--- a/docs/configexamples/rst-ipsec-pa-route-based.rst
+++ b/docs/_rst_legacy/configexamples/rst-ipsec-pa-route-based.rst
diff --git a/docs/configexamples/rst-l3vpn-hub-and-spoke.rst b/docs/_rst_legacy/configexamples/rst-l3vpn-hub-and-spoke.rst
index 8e1d0051..8e1d0051 100644
--- a/docs/configexamples/rst-l3vpn-hub-and-spoke.rst
+++ b/docs/_rst_legacy/configexamples/rst-l3vpn-hub-and-spoke.rst
diff --git a/docs/configexamples/rst-lac-lns.rst b/docs/_rst_legacy/configexamples/rst-lac-lns.rst
index 8443ddff..8443ddff 100644
--- a/docs/configexamples/rst-lac-lns.rst
+++ b/docs/_rst_legacy/configexamples/rst-lac-lns.rst
diff --git a/docs/configexamples/rst-nmp.rst b/docs/_rst_legacy/configexamples/rst-nmp.rst
index 913e7107..913e7107 100644
--- a/docs/configexamples/rst-nmp.rst
+++ b/docs/_rst_legacy/configexamples/rst-nmp.rst
diff --git a/docs/configexamples/rst-ospf-unnumbered.rst b/docs/_rst_legacy/configexamples/rst-ospf-unnumbered.rst
index 6a5a1bb4..6a5a1bb4 100644
--- a/docs/configexamples/rst-ospf-unnumbered.rst
+++ b/docs/_rst_legacy/configexamples/rst-ospf-unnumbered.rst
diff --git a/docs/configexamples/rst-pppoe-ipv6-basic.rst b/docs/_rst_legacy/configexamples/rst-pppoe-ipv6-basic.rst
index ad588def..ad588def 100644
--- a/docs/configexamples/rst-pppoe-ipv6-basic.rst
+++ b/docs/_rst_legacy/configexamples/rst-pppoe-ipv6-basic.rst
diff --git a/docs/configexamples/rst-qos.rst b/docs/_rst_legacy/configexamples/rst-qos.rst
index 842719c5..842719c5 100644
--- a/docs/configexamples/rst-qos.rst
+++ b/docs/_rst_legacy/configexamples/rst-qos.rst
diff --git a/docs/configexamples/rst-segment-routing-isis.rst b/docs/_rst_legacy/configexamples/rst-segment-routing-isis.rst
index d9bc439b..d9bc439b 100644
--- a/docs/configexamples/rst-segment-routing-isis.rst
+++ b/docs/_rst_legacy/configexamples/rst-segment-routing-isis.rst
diff --git a/docs/configexamples/rst-wan-load-balancing.rst b/docs/_rst_legacy/configexamples/rst-wan-load-balancing.rst
index ace9a981..ace9a981 100644
--- a/docs/configexamples/rst-wan-load-balancing.rst
+++ b/docs/_rst_legacy/configexamples/rst-wan-load-balancing.rst
diff --git a/docs/configexamples/rst-zone-policy.rst b/docs/_rst_legacy/configexamples/rst-zone-policy.rst
index d0101ebf..d0101ebf 100644
--- a/docs/configexamples/rst-zone-policy.rst
+++ b/docs/_rst_legacy/configexamples/rst-zone-policy.rst
diff --git a/docs/configuration/container/rst-index.rst b/docs/_rst_legacy/configuration/container/rst-index.rst
index 69e599a4..69e599a4 100644
--- a/docs/configuration/container/rst-index.rst
+++ b/docs/_rst_legacy/configuration/container/rst-index.rst
diff --git a/docs/configuration/firewall/rst-bridge.rst b/docs/_rst_legacy/configuration/firewall/rst-bridge.rst
index bba9e56f..bba9e56f 100644
--- a/docs/configuration/firewall/rst-bridge.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-bridge.rst
diff --git a/docs/configuration/firewall/rst-flowtables.rst b/docs/_rst_legacy/configuration/firewall/rst-flowtables.rst
index 917e74cc..917e74cc 100644
--- a/docs/configuration/firewall/rst-flowtables.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-flowtables.rst
diff --git a/docs/configuration/firewall/rst-global-options.rst b/docs/_rst_legacy/configuration/firewall/rst-global-options.rst
index b3f311aa..b3f311aa 100644
--- a/docs/configuration/firewall/rst-global-options.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-global-options.rst
diff --git a/docs/configuration/firewall/rst-groups.rst b/docs/_rst_legacy/configuration/firewall/rst-groups.rst
index 6111650a..6111650a 100644
--- a/docs/configuration/firewall/rst-groups.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-groups.rst
diff --git a/docs/configuration/firewall/rst-index.rst b/docs/_rst_legacy/configuration/firewall/rst-index.rst
index 44e0cd20..44e0cd20 100644
--- a/docs/configuration/firewall/rst-index.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-index.rst
diff --git a/docs/configuration/firewall/rst-ipv4.rst b/docs/_rst_legacy/configuration/firewall/rst-ipv4.rst
index 2a654fd7..2a654fd7 100644
--- a/docs/configuration/firewall/rst-ipv4.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-ipv4.rst
diff --git a/docs/configuration/firewall/rst-ipv6.rst b/docs/_rst_legacy/configuration/firewall/rst-ipv6.rst
index 19df996a..19df996a 100644
--- a/docs/configuration/firewall/rst-ipv6.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-ipv6.rst
diff --git a/docs/configuration/firewall/rst-zone.rst b/docs/_rst_legacy/configuration/firewall/rst-zone.rst
index 059b029d..059b029d 100644
--- a/docs/configuration/firewall/rst-zone.rst
+++ b/docs/_rst_legacy/configuration/firewall/rst-zone.rst
diff --git a/docs/configuration/highavailability/rst-index.rst b/docs/_rst_legacy/configuration/highavailability/rst-index.rst
index 3320874d..3320874d 100644
--- a/docs/configuration/highavailability/rst-index.rst
+++ b/docs/_rst_legacy/configuration/highavailability/rst-index.rst
diff --git a/docs/configuration/interfaces/rst-bonding.rst b/docs/_rst_legacy/configuration/interfaces/rst-bonding.rst
index 27f1bbed..27f1bbed 100644
--- a/docs/configuration/interfaces/rst-bonding.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-bonding.rst
diff --git a/docs/configuration/interfaces/rst-bridge.rst b/docs/_rst_legacy/configuration/interfaces/rst-bridge.rst
index e69a6e26..e69a6e26 100644
--- a/docs/configuration/interfaces/rst-bridge.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-bridge.rst
diff --git a/docs/configuration/interfaces/rst-dummy.rst b/docs/_rst_legacy/configuration/interfaces/rst-dummy.rst
index 945361c2..945361c2 100644
--- a/docs/configuration/interfaces/rst-dummy.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-dummy.rst
diff --git a/docs/configuration/interfaces/rst-ethernet.rst b/docs/_rst_legacy/configuration/interfaces/rst-ethernet.rst
index 30a13b5b..30a13b5b 100644
--- a/docs/configuration/interfaces/rst-ethernet.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-ethernet.rst
diff --git a/docs/configuration/interfaces/rst-geneve.rst b/docs/_rst_legacy/configuration/interfaces/rst-geneve.rst
index 1e8b8096..1e8b8096 100644
--- a/docs/configuration/interfaces/rst-geneve.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-geneve.rst
diff --git a/docs/configuration/interfaces/rst-index.rst b/docs/_rst_legacy/configuration/interfaces/rst-index.rst
index 0f02d1e3..0f02d1e3 100644
--- a/docs/configuration/interfaces/rst-index.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-index.rst
diff --git a/docs/configuration/interfaces/rst-l2tpv3.rst b/docs/_rst_legacy/configuration/interfaces/rst-l2tpv3.rst
index 4fa47199..4fa47199 100644
--- a/docs/configuration/interfaces/rst-l2tpv3.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-l2tpv3.rst
diff --git a/docs/configuration/interfaces/rst-loopback.rst b/docs/_rst_legacy/configuration/interfaces/rst-loopback.rst
index b5fbdf83..b5fbdf83 100644
--- a/docs/configuration/interfaces/rst-loopback.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-loopback.rst
diff --git a/docs/configuration/interfaces/rst-macsec.rst b/docs/_rst_legacy/configuration/interfaces/rst-macsec.rst
index 1ab7f361..1ab7f361 100644
--- a/docs/configuration/interfaces/rst-macsec.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-macsec.rst
diff --git a/docs/configuration/interfaces/rst-openvpn.rst b/docs/_rst_legacy/configuration/interfaces/rst-openvpn.rst
index 76d44ed5..76d44ed5 100644
--- a/docs/configuration/interfaces/rst-openvpn.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-openvpn.rst
diff --git a/docs/configuration/interfaces/rst-pppoe.rst b/docs/_rst_legacy/configuration/interfaces/rst-pppoe.rst
index 65081e1c..65081e1c 100644
--- a/docs/configuration/interfaces/rst-pppoe.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-pppoe.rst
diff --git a/docs/configuration/interfaces/rst-pseudo-ethernet.rst b/docs/_rst_legacy/configuration/interfaces/rst-pseudo-ethernet.rst
index 59b3581c..59b3581c 100644
--- a/docs/configuration/interfaces/rst-pseudo-ethernet.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-pseudo-ethernet.rst
diff --git a/docs/configuration/interfaces/rst-sstp-client.rst b/docs/_rst_legacy/configuration/interfaces/rst-sstp-client.rst
index 27eb9c39..27eb9c39 100644
--- a/docs/configuration/interfaces/rst-sstp-client.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-sstp-client.rst
diff --git a/docs/configuration/interfaces/rst-tunnel.rst b/docs/_rst_legacy/configuration/interfaces/rst-tunnel.rst
index 31539d9f..31539d9f 100644
--- a/docs/configuration/interfaces/rst-tunnel.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-tunnel.rst
diff --git a/docs/configuration/interfaces/rst-virtual-ethernet.rst b/docs/_rst_legacy/configuration/interfaces/rst-virtual-ethernet.rst
index 3324feb6..3324feb6 100644
--- a/docs/configuration/interfaces/rst-virtual-ethernet.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-virtual-ethernet.rst
diff --git a/docs/configuration/interfaces/rst-vti.rst b/docs/_rst_legacy/configuration/interfaces/rst-vti.rst
index 1704b9d1..1704b9d1 100644
--- a/docs/configuration/interfaces/rst-vti.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-vti.rst
diff --git a/docs/configuration/interfaces/rst-vxlan.rst b/docs/_rst_legacy/configuration/interfaces/rst-vxlan.rst
index 831870c5..831870c5 100644
--- a/docs/configuration/interfaces/rst-vxlan.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-vxlan.rst
diff --git a/docs/configuration/interfaces/rst-wireguard.rst b/docs/_rst_legacy/configuration/interfaces/rst-wireguard.rst
index a40bee01..a40bee01 100644
--- a/docs/configuration/interfaces/rst-wireguard.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-wireguard.rst
diff --git a/docs/configuration/interfaces/rst-wireless.rst b/docs/_rst_legacy/configuration/interfaces/rst-wireless.rst
index df153763..df153763 100644
--- a/docs/configuration/interfaces/rst-wireless.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-wireless.rst
diff --git a/docs/configuration/interfaces/rst-wwan.rst b/docs/_rst_legacy/configuration/interfaces/rst-wwan.rst
index 76a4a3d7..76a4a3d7 100644
--- a/docs/configuration/interfaces/rst-wwan.rst
+++ b/docs/_rst_legacy/configuration/interfaces/rst-wwan.rst
diff --git a/docs/configuration/loadbalancing/rst-index.rst b/docs/_rst_legacy/configuration/loadbalancing/rst-index.rst
index 382bd0d7..382bd0d7 100644
--- a/docs/configuration/loadbalancing/rst-index.rst
+++ b/docs/_rst_legacy/configuration/loadbalancing/rst-index.rst
diff --git a/docs/configuration/loadbalancing/rst-reverse-proxy.rst b/docs/_rst_legacy/configuration/loadbalancing/rst-reverse-proxy.rst
index 32be85c8..32be85c8 100644
--- a/docs/configuration/loadbalancing/rst-reverse-proxy.rst
+++ b/docs/_rst_legacy/configuration/loadbalancing/rst-reverse-proxy.rst
diff --git a/docs/configuration/loadbalancing/rst-wan.rst b/docs/_rst_legacy/configuration/loadbalancing/rst-wan.rst
index 745cd8c2..745cd8c2 100644
--- a/docs/configuration/loadbalancing/rst-wan.rst
+++ b/docs/_rst_legacy/configuration/loadbalancing/rst-wan.rst
diff --git a/docs/configuration/nat/rst-index.rst b/docs/_rst_legacy/configuration/nat/rst-index.rst
index 6556b7f9..6556b7f9 100644
--- a/docs/configuration/nat/rst-index.rst
+++ b/docs/_rst_legacy/configuration/nat/rst-index.rst
diff --git a/docs/configuration/nat/rst-nat44.rst b/docs/_rst_legacy/configuration/nat/rst-nat44.rst
index e833ae5f..e833ae5f 100644
--- a/docs/configuration/nat/rst-nat44.rst
+++ b/docs/_rst_legacy/configuration/nat/rst-nat44.rst
diff --git a/docs/configuration/nat/rst-nat64.rst b/docs/_rst_legacy/configuration/nat/rst-nat64.rst
index e8a3a0e6..e8a3a0e6 100644
--- a/docs/configuration/nat/rst-nat64.rst
+++ b/docs/_rst_legacy/configuration/nat/rst-nat64.rst
diff --git a/docs/configuration/nat/rst-nat66.rst b/docs/_rst_legacy/configuration/nat/rst-nat66.rst
index 146ed381..146ed381 100644
--- a/docs/configuration/nat/rst-nat66.rst
+++ b/docs/_rst_legacy/configuration/nat/rst-nat66.rst
diff --git a/docs/configuration/pki/rst-index.rst b/docs/_rst_legacy/configuration/pki/rst-index.rst
index 70b89d9f..70b89d9f 100644
--- a/docs/configuration/pki/rst-index.rst
+++ b/docs/_rst_legacy/configuration/pki/rst-index.rst
diff --git a/docs/configuration/policy/rst-access-list.rst b/docs/_rst_legacy/configuration/policy/rst-access-list.rst
index 0af9b911..0af9b911 100644
--- a/docs/configuration/policy/rst-access-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-access-list.rst
diff --git a/docs/configuration/policy/rst-as-path-list.rst b/docs/_rst_legacy/configuration/policy/rst-as-path-list.rst
index ceeb8e01..ceeb8e01 100644
--- a/docs/configuration/policy/rst-as-path-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-as-path-list.rst
diff --git a/docs/configuration/policy/rst-community-list.rst b/docs/_rst_legacy/configuration/policy/rst-community-list.rst
index e53abeb3..e53abeb3 100644
--- a/docs/configuration/policy/rst-community-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-community-list.rst
diff --git a/docs/configuration/policy/rst-examples.rst b/docs/_rst_legacy/configuration/policy/rst-examples.rst
index d822d839..d822d839 100644
--- a/docs/configuration/policy/rst-examples.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-examples.rst
diff --git a/docs/configuration/policy/rst-extcommunity-list.rst b/docs/_rst_legacy/configuration/policy/rst-extcommunity-list.rst
index c413b8b5..c413b8b5 100644
--- a/docs/configuration/policy/rst-extcommunity-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-extcommunity-list.rst
diff --git a/docs/configuration/policy/rst-index.rst b/docs/_rst_legacy/configuration/policy/rst-index.rst
index 51f60479..51f60479 100644
--- a/docs/configuration/policy/rst-index.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-index.rst
diff --git a/docs/configuration/policy/rst-large-community-list.rst b/docs/_rst_legacy/configuration/policy/rst-large-community-list.rst
index 0c57fd4a..0c57fd4a 100644
--- a/docs/configuration/policy/rst-large-community-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-large-community-list.rst
diff --git a/docs/configuration/policy/rst-local-route.rst b/docs/_rst_legacy/configuration/policy/rst-local-route.rst
index e24d61d0..e24d61d0 100644
--- a/docs/configuration/policy/rst-local-route.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-local-route.rst
diff --git a/docs/configuration/policy/rst-prefix-list.rst b/docs/_rst_legacy/configuration/policy/rst-prefix-list.rst
index cc0d8441..cc0d8441 100644
--- a/docs/configuration/policy/rst-prefix-list.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-prefix-list.rst
diff --git a/docs/configuration/policy/rst-route-map.rst b/docs/_rst_legacy/configuration/policy/rst-route-map.rst
index 909f7e25..909f7e25 100644
--- a/docs/configuration/policy/rst-route-map.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-route-map.rst
diff --git a/docs/configuration/policy/rst-route.rst b/docs/_rst_legacy/configuration/policy/rst-route.rst
index 45975774..45975774 100644
--- a/docs/configuration/policy/rst-route.rst
+++ b/docs/_rst_legacy/configuration/policy/rst-route.rst
diff --git a/docs/configuration/protocols/rst-babel.rst b/docs/_rst_legacy/configuration/protocols/rst-babel.rst
index 07d1bc86..07d1bc86 100644
--- a/docs/configuration/protocols/rst-babel.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-babel.rst
diff --git a/docs/configuration/protocols/rst-bfd.rst b/docs/_rst_legacy/configuration/protocols/rst-bfd.rst
index 30876efc..30876efc 100644
--- a/docs/configuration/protocols/rst-bfd.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-bfd.rst
diff --git a/docs/configuration/protocols/rst-bgp.rst b/docs/_rst_legacy/configuration/protocols/rst-bgp.rst
index 6d93bcc4..6d93bcc4 100644
--- a/docs/configuration/protocols/rst-bgp.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-bgp.rst
diff --git a/docs/configuration/protocols/rst-failover.rst b/docs/_rst_legacy/configuration/protocols/rst-failover.rst
index 8088e104..8088e104 100644
--- a/docs/configuration/protocols/rst-failover.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-failover.rst
diff --git a/docs/configuration/protocols/rst-igmp-proxy.rst b/docs/_rst_legacy/configuration/protocols/rst-igmp-proxy.rst
index f62a289e..f62a289e 100644
--- a/docs/configuration/protocols/rst-igmp-proxy.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-igmp-proxy.rst
diff --git a/docs/configuration/protocols/rst-index.rst b/docs/_rst_legacy/configuration/protocols/rst-index.rst
index ea217d3c..ea217d3c 100644
--- a/docs/configuration/protocols/rst-index.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-index.rst
diff --git a/docs/configuration/protocols/rst-isis.rst b/docs/_rst_legacy/configuration/protocols/rst-isis.rst
index 18a7c166..18a7c166 100644
--- a/docs/configuration/protocols/rst-isis.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-isis.rst
diff --git a/docs/configuration/protocols/rst-mpls.rst b/docs/_rst_legacy/configuration/protocols/rst-mpls.rst
index 550473d7..550473d7 100644
--- a/docs/configuration/protocols/rst-mpls.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-mpls.rst
diff --git a/docs/configuration/protocols/rst-ospf.rst b/docs/_rst_legacy/configuration/protocols/rst-ospf.rst
index 43680520..43680520 100644
--- a/docs/configuration/protocols/rst-ospf.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-ospf.rst
diff --git a/docs/configuration/protocols/rst-pim.rst b/docs/_rst_legacy/configuration/protocols/rst-pim.rst
index 2e881943..2e881943 100644
--- a/docs/configuration/protocols/rst-pim.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-pim.rst
diff --git a/docs/configuration/protocols/rst-pim6.rst b/docs/_rst_legacy/configuration/protocols/rst-pim6.rst
index 2b2276a7..2b2276a7 100644
--- a/docs/configuration/protocols/rst-pim6.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-pim6.rst
diff --git a/docs/configuration/protocols/rst-rip.rst b/docs/_rst_legacy/configuration/protocols/rst-rip.rst
index fd20a90c..fd20a90c 100644
--- a/docs/configuration/protocols/rst-rip.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-rip.rst
diff --git a/docs/configuration/protocols/rst-rpki.rst b/docs/_rst_legacy/configuration/protocols/rst-rpki.rst
index 17557884..17557884 100644
--- a/docs/configuration/protocols/rst-rpki.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-rpki.rst
diff --git a/docs/configuration/protocols/rst-segment-routing.rst b/docs/_rst_legacy/configuration/protocols/rst-segment-routing.rst
index 5ee710e9..5ee710e9 100644
--- a/docs/configuration/protocols/rst-segment-routing.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-segment-routing.rst
diff --git a/docs/configuration/protocols/rst-static.rst b/docs/_rst_legacy/configuration/protocols/rst-static.rst
index bfc25201..bfc25201 100644
--- a/docs/configuration/protocols/rst-static.rst
+++ b/docs/_rst_legacy/configuration/protocols/rst-static.rst
diff --git a/docs/configuration/rst-index.rst b/docs/_rst_legacy/configuration/rst-index.rst
index f607d4d7..f607d4d7 100644
--- a/docs/configuration/rst-index.rst
+++ b/docs/_rst_legacy/configuration/rst-index.rst
diff --git a/docs/configuration/service/rst-broadcast-relay.rst b/docs/_rst_legacy/configuration/service/rst-broadcast-relay.rst
index b6e2bed7..b6e2bed7 100644
--- a/docs/configuration/service/rst-broadcast-relay.rst
+++ b/docs/_rst_legacy/configuration/service/rst-broadcast-relay.rst
diff --git a/docs/configuration/service/rst-config-sync.rst b/docs/_rst_legacy/configuration/service/rst-config-sync.rst
index d0449a78..d0449a78 100644
--- a/docs/configuration/service/rst-config-sync.rst
+++ b/docs/_rst_legacy/configuration/service/rst-config-sync.rst
diff --git a/docs/configuration/service/rst-conntrack-sync.rst b/docs/_rst_legacy/configuration/service/rst-conntrack-sync.rst
index de86450e..de86450e 100644
--- a/docs/configuration/service/rst-conntrack-sync.rst
+++ b/docs/_rst_legacy/configuration/service/rst-conntrack-sync.rst
diff --git a/docs/configuration/service/rst-console-server.rst b/docs/_rst_legacy/configuration/service/rst-console-server.rst
index c9ea7f77..c9ea7f77 100644
--- a/docs/configuration/service/rst-console-server.rst
+++ b/docs/_rst_legacy/configuration/service/rst-console-server.rst
diff --git a/docs/configuration/service/rst-dhcp-relay.rst b/docs/_rst_legacy/configuration/service/rst-dhcp-relay.rst
index dc45d071..dc45d071 100644
--- a/docs/configuration/service/rst-dhcp-relay.rst
+++ b/docs/_rst_legacy/configuration/service/rst-dhcp-relay.rst
diff --git a/docs/configuration/service/rst-dhcp-server.rst b/docs/_rst_legacy/configuration/service/rst-dhcp-server.rst
index 7df69e45..7df69e45 100644
--- a/docs/configuration/service/rst-dhcp-server.rst
+++ b/docs/_rst_legacy/configuration/service/rst-dhcp-server.rst
diff --git a/docs/configuration/service/rst-dns.rst b/docs/_rst_legacy/configuration/service/rst-dns.rst
index c6deb179..c6deb179 100644
--- a/docs/configuration/service/rst-dns.rst
+++ b/docs/_rst_legacy/configuration/service/rst-dns.rst
diff --git a/docs/configuration/service/rst-eventhandler.rst b/docs/_rst_legacy/configuration/service/rst-eventhandler.rst
index 15f08239..15f08239 100644
--- a/docs/configuration/service/rst-eventhandler.rst
+++ b/docs/_rst_legacy/configuration/service/rst-eventhandler.rst
diff --git a/docs/configuration/service/rst-https.rst b/docs/_rst_legacy/configuration/service/rst-https.rst
index 973c5355..973c5355 100644
--- a/docs/configuration/service/rst-https.rst
+++ b/docs/_rst_legacy/configuration/service/rst-https.rst
diff --git a/docs/configuration/service/rst-ids.rst b/docs/_rst_legacy/configuration/service/rst-ids.rst
index 3e508d50..3e508d50 100644
--- a/docs/configuration/service/rst-ids.rst
+++ b/docs/_rst_legacy/configuration/service/rst-ids.rst
diff --git a/docs/configuration/service/rst-index.rst b/docs/_rst_legacy/configuration/service/rst-index.rst
index abb77ef4..abb77ef4 100644
--- a/docs/configuration/service/rst-index.rst
+++ b/docs/_rst_legacy/configuration/service/rst-index.rst
diff --git a/docs/configuration/service/rst-ipoe-server.rst b/docs/_rst_legacy/configuration/service/rst-ipoe-server.rst
index 3f9d2cee..3f9d2cee 100644
--- a/docs/configuration/service/rst-ipoe-server.rst
+++ b/docs/_rst_legacy/configuration/service/rst-ipoe-server.rst
diff --git a/docs/configuration/service/rst-lldp.rst b/docs/_rst_legacy/configuration/service/rst-lldp.rst
index 12a9e0b6..12a9e0b6 100644
--- a/docs/configuration/service/rst-lldp.rst
+++ b/docs/_rst_legacy/configuration/service/rst-lldp.rst
diff --git a/docs/configuration/service/rst-mdns.rst b/docs/_rst_legacy/configuration/service/rst-mdns.rst
index b4ca1fd1..b4ca1fd1 100644
--- a/docs/configuration/service/rst-mdns.rst
+++ b/docs/_rst_legacy/configuration/service/rst-mdns.rst
diff --git a/docs/configuration/service/rst-monitoring.rst b/docs/_rst_legacy/configuration/service/rst-monitoring.rst
index 245af067..245af067 100644
--- a/docs/configuration/service/rst-monitoring.rst
+++ b/docs/_rst_legacy/configuration/service/rst-monitoring.rst
diff --git a/docs/configuration/service/rst-ntp.rst b/docs/_rst_legacy/configuration/service/rst-ntp.rst
index f82baa34..f82baa34 100644
--- a/docs/configuration/service/rst-ntp.rst
+++ b/docs/_rst_legacy/configuration/service/rst-ntp.rst
diff --git a/docs/configuration/service/rst-pppoe-server.rst b/docs/_rst_legacy/configuration/service/rst-pppoe-server.rst
index 6d818c70..6d818c70 100644
--- a/docs/configuration/service/rst-pppoe-server.rst
+++ b/docs/_rst_legacy/configuration/service/rst-pppoe-server.rst
diff --git a/docs/configuration/service/rst-router-advert.rst b/docs/_rst_legacy/configuration/service/rst-router-advert.rst
index 3efc3454..3efc3454 100644
--- a/docs/configuration/service/rst-router-advert.rst
+++ b/docs/_rst_legacy/configuration/service/rst-router-advert.rst
diff --git a/docs/configuration/service/rst-salt-minion.rst b/docs/_rst_legacy/configuration/service/rst-salt-minion.rst
index aa747c36..aa747c36 100644
--- a/docs/configuration/service/rst-salt-minion.rst
+++ b/docs/_rst_legacy/configuration/service/rst-salt-minion.rst
diff --git a/docs/configuration/service/rst-snmp.rst b/docs/_rst_legacy/configuration/service/rst-snmp.rst
index b444ab85..b444ab85 100644
--- a/docs/configuration/service/rst-snmp.rst
+++ b/docs/_rst_legacy/configuration/service/rst-snmp.rst
diff --git a/docs/configuration/service/rst-ssh.rst b/docs/_rst_legacy/configuration/service/rst-ssh.rst
index 4770c950..4770c950 100644
--- a/docs/configuration/service/rst-ssh.rst
+++ b/docs/_rst_legacy/configuration/service/rst-ssh.rst
diff --git a/docs/configuration/service/rst-tftp-server.rst b/docs/_rst_legacy/configuration/service/rst-tftp-server.rst
index 84acf3d4..84acf3d4 100644
--- a/docs/configuration/service/rst-tftp-server.rst
+++ b/docs/_rst_legacy/configuration/service/rst-tftp-server.rst
diff --git a/docs/configuration/service/rst-webproxy.rst b/docs/_rst_legacy/configuration/service/rst-webproxy.rst
index a6c5ff0a..a6c5ff0a 100644
--- a/docs/configuration/service/rst-webproxy.rst
+++ b/docs/_rst_legacy/configuration/service/rst-webproxy.rst
diff --git a/docs/configuration/system/rst-acceleration.rst b/docs/_rst_legacy/configuration/system/rst-acceleration.rst
index 63506d6d..63506d6d 100644
--- a/docs/configuration/system/rst-acceleration.rst
+++ b/docs/_rst_legacy/configuration/system/rst-acceleration.rst
diff --git a/docs/configuration/system/rst-conntrack.rst b/docs/_rst_legacy/configuration/system/rst-conntrack.rst
index 68a4f2b8..68a4f2b8 100644
--- a/docs/configuration/system/rst-conntrack.rst
+++ b/docs/_rst_legacy/configuration/system/rst-conntrack.rst
diff --git a/docs/configuration/system/rst-console.rst b/docs/_rst_legacy/configuration/system/rst-console.rst
index 1f917e54..1f917e54 100644
--- a/docs/configuration/system/rst-console.rst
+++ b/docs/_rst_legacy/configuration/system/rst-console.rst
diff --git a/docs/configuration/system/rst-default-route.rst b/docs/_rst_legacy/configuration/system/rst-default-route.rst
index e102eb9c..e102eb9c 100644
--- a/docs/configuration/system/rst-default-route.rst
+++ b/docs/_rst_legacy/configuration/system/rst-default-route.rst
diff --git a/docs/configuration/system/rst-flow-accounting.rst b/docs/_rst_legacy/configuration/system/rst-flow-accounting.rst
index 7ed2d88c..7ed2d88c 100644
--- a/docs/configuration/system/rst-flow-accounting.rst
+++ b/docs/_rst_legacy/configuration/system/rst-flow-accounting.rst
diff --git a/docs/configuration/system/rst-frr.rst b/docs/_rst_legacy/configuration/system/rst-frr.rst
index a7f7ff93..a7f7ff93 100644
--- a/docs/configuration/system/rst-frr.rst
+++ b/docs/_rst_legacy/configuration/system/rst-frr.rst
diff --git a/docs/configuration/system/rst-host-name.rst b/docs/_rst_legacy/configuration/system/rst-host-name.rst
index 4d1567bf..4d1567bf 100644
--- a/docs/configuration/system/rst-host-name.rst
+++ b/docs/_rst_legacy/configuration/system/rst-host-name.rst
diff --git a/docs/configuration/system/rst-index.rst b/docs/_rst_legacy/configuration/system/rst-index.rst
index dbb63d09..dbb63d09 100644
--- a/docs/configuration/system/rst-index.rst
+++ b/docs/_rst_legacy/configuration/system/rst-index.rst
diff --git a/docs/configuration/system/rst-ip.rst b/docs/_rst_legacy/configuration/system/rst-ip.rst
index 279630e2..279630e2 100644
--- a/docs/configuration/system/rst-ip.rst
+++ b/docs/_rst_legacy/configuration/system/rst-ip.rst
diff --git a/docs/configuration/system/rst-ipv6.rst b/docs/_rst_legacy/configuration/system/rst-ipv6.rst
index ee0fa341..ee0fa341 100644
--- a/docs/configuration/system/rst-ipv6.rst
+++ b/docs/_rst_legacy/configuration/system/rst-ipv6.rst
diff --git a/docs/configuration/system/rst-lcd.rst b/docs/_rst_legacy/configuration/system/rst-lcd.rst
index 808d45a2..808d45a2 100644
--- a/docs/configuration/system/rst-lcd.rst
+++ b/docs/_rst_legacy/configuration/system/rst-lcd.rst
diff --git a/docs/configuration/system/rst-login.rst b/docs/_rst_legacy/configuration/system/rst-login.rst
index 6009a39b..6009a39b 100644
--- a/docs/configuration/system/rst-login.rst
+++ b/docs/_rst_legacy/configuration/system/rst-login.rst
diff --git a/docs/configuration/system/rst-name-server.rst b/docs/_rst_legacy/configuration/system/rst-name-server.rst
index 5d08dbc5..5d08dbc5 100644
--- a/docs/configuration/system/rst-name-server.rst
+++ b/docs/_rst_legacy/configuration/system/rst-name-server.rst
diff --git a/docs/configuration/system/rst-option.rst b/docs/_rst_legacy/configuration/system/rst-option.rst
index d039315c..d039315c 100644
--- a/docs/configuration/system/rst-option.rst
+++ b/docs/_rst_legacy/configuration/system/rst-option.rst
diff --git a/docs/configuration/system/rst-proxy.rst b/docs/_rst_legacy/configuration/system/rst-proxy.rst
index 8e0339a7..8e0339a7 100644
--- a/docs/configuration/system/rst-proxy.rst
+++ b/docs/_rst_legacy/configuration/system/rst-proxy.rst
diff --git a/docs/configuration/system/rst-sflow.rst b/docs/_rst_legacy/configuration/system/rst-sflow.rst
index c2cf5a80..c2cf5a80 100644
--- a/docs/configuration/system/rst-sflow.rst
+++ b/docs/_rst_legacy/configuration/system/rst-sflow.rst
diff --git a/docs/configuration/system/rst-sysctl.rst b/docs/_rst_legacy/configuration/system/rst-sysctl.rst
index 06e15031..06e15031 100644
--- a/docs/configuration/system/rst-sysctl.rst
+++ b/docs/_rst_legacy/configuration/system/rst-sysctl.rst
diff --git a/docs/configuration/system/rst-syslog.rst b/docs/_rst_legacy/configuration/system/rst-syslog.rst
index 95c3bc87..95c3bc87 100644
--- a/docs/configuration/system/rst-syslog.rst
+++ b/docs/_rst_legacy/configuration/system/rst-syslog.rst
diff --git a/docs/configuration/system/rst-task-scheduler.rst b/docs/_rst_legacy/configuration/system/rst-task-scheduler.rst
index 382da39f..382da39f 100644
--- a/docs/configuration/system/rst-task-scheduler.rst
+++ b/docs/_rst_legacy/configuration/system/rst-task-scheduler.rst
diff --git a/docs/configuration/system/rst-time-zone.rst b/docs/_rst_legacy/configuration/system/rst-time-zone.rst
index 025c4376..025c4376 100644
--- a/docs/configuration/system/rst-time-zone.rst
+++ b/docs/_rst_legacy/configuration/system/rst-time-zone.rst
diff --git a/docs/configuration/system/rst-updates.rst b/docs/_rst_legacy/configuration/system/rst-updates.rst
index a55bfa9a..a55bfa9a 100644
--- a/docs/configuration/system/rst-updates.rst
+++ b/docs/_rst_legacy/configuration/system/rst-updates.rst
diff --git a/docs/configuration/trafficpolicy/rst-index.rst b/docs/_rst_legacy/configuration/trafficpolicy/rst-index.rst
index 3fb9a9bc..3fb9a9bc 100644
--- a/docs/configuration/trafficpolicy/rst-index.rst
+++ b/docs/_rst_legacy/configuration/trafficpolicy/rst-index.rst
diff --git a/docs/configuration/vpn/ipsec/rst-index.rst b/docs/_rst_legacy/configuration/vpn/ipsec/rst-index.rst
index b19ffcfe..b19ffcfe 100644
--- a/docs/configuration/vpn/ipsec/rst-index.rst
+++ b/docs/_rst_legacy/configuration/vpn/ipsec/rst-index.rst
diff --git a/docs/configuration/vpn/ipsec/rst-ipsec_general.rst b/docs/_rst_legacy/configuration/vpn/ipsec/rst-ipsec_general.rst
index bf0d7668..bf0d7668 100644
--- a/docs/configuration/vpn/ipsec/rst-ipsec_general.rst
+++ b/docs/_rst_legacy/configuration/vpn/ipsec/rst-ipsec_general.rst
diff --git a/docs/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst b/docs/_rst_legacy/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst
index 1a41d987..1a41d987 100644
--- a/docs/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst
+++ b/docs/_rst_legacy/configuration/vpn/ipsec/rst-remoteaccess_ipsec.rst
diff --git a/docs/configuration/vpn/ipsec/rst-site2site_ipsec.rst b/docs/_rst_legacy/configuration/vpn/ipsec/rst-site2site_ipsec.rst
index 80dfa423..80dfa423 100644
--- a/docs/configuration/vpn/ipsec/rst-site2site_ipsec.rst
+++ b/docs/_rst_legacy/configuration/vpn/ipsec/rst-site2site_ipsec.rst
diff --git a/docs/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst b/docs/_rst_legacy/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst
index fdeb347d..fdeb347d 100644
--- a/docs/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst
+++ b/docs/_rst_legacy/configuration/vpn/ipsec/rst-troubleshooting_ipsec.rst
diff --git a/docs/configuration/vpn/rst-dmvpn.rst b/docs/_rst_legacy/configuration/vpn/rst-dmvpn.rst
index fa08f115..fa08f115 100644
--- a/docs/configuration/vpn/rst-dmvpn.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-dmvpn.rst
diff --git a/docs/configuration/vpn/rst-index.rst b/docs/_rst_legacy/configuration/vpn/rst-index.rst
index 12bcc6f0..12bcc6f0 100644
--- a/docs/configuration/vpn/rst-index.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-index.rst
diff --git a/docs/configuration/vpn/rst-l2tp.rst b/docs/_rst_legacy/configuration/vpn/rst-l2tp.rst
index 15613ab2..15613ab2 100644
--- a/docs/configuration/vpn/rst-l2tp.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-l2tp.rst
diff --git a/docs/configuration/vpn/rst-openconnect.rst b/docs/_rst_legacy/configuration/vpn/rst-openconnect.rst
index c234d4dc..c234d4dc 100644
--- a/docs/configuration/vpn/rst-openconnect.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-openconnect.rst
diff --git a/docs/configuration/vpn/rst-pptp.rst b/docs/_rst_legacy/configuration/vpn/rst-pptp.rst
index 5220929f..5220929f 100644
--- a/docs/configuration/vpn/rst-pptp.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-pptp.rst
diff --git a/docs/configuration/vpn/rst-rsa-keys.rst b/docs/_rst_legacy/configuration/vpn/rst-rsa-keys.rst
index a95f5f33..a95f5f33 100644
--- a/docs/configuration/vpn/rst-rsa-keys.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-rsa-keys.rst
diff --git a/docs/configuration/vpn/rst-sstp.rst b/docs/_rst_legacy/configuration/vpn/rst-sstp.rst
index e750cdcf..e750cdcf 100644
--- a/docs/configuration/vpn/rst-sstp.rst
+++ b/docs/_rst_legacy/configuration/vpn/rst-sstp.rst
diff --git a/docs/configuration/vrf/rst-index.rst b/docs/_rst_legacy/configuration/vrf/rst-index.rst
index 0d44e326..0d44e326 100644
--- a/docs/configuration/vrf/rst-index.rst
+++ b/docs/_rst_legacy/configuration/vrf/rst-index.rst
diff --git a/docs/contributing/rst-build-vyos.rst b/docs/_rst_legacy/contributing/rst-build-vyos.rst
index a9dacda4..a9dacda4 100644
--- a/docs/contributing/rst-build-vyos.rst
+++ b/docs/_rst_legacy/contributing/rst-build-vyos.rst
diff --git a/docs/contributing/rst-debugging.rst b/docs/_rst_legacy/contributing/rst-debugging.rst
index e03f3f81..e03f3f81 100644
--- a/docs/contributing/rst-debugging.rst
+++ b/docs/_rst_legacy/contributing/rst-debugging.rst
diff --git a/docs/contributing/rst-development.rst b/docs/_rst_legacy/contributing/rst-development.rst
index e39af3a5..e39af3a5 100644
--- a/docs/contributing/rst-development.rst
+++ b/docs/_rst_legacy/contributing/rst-development.rst
diff --git a/docs/contributing/rst-issues-features.rst b/docs/_rst_legacy/contributing/rst-issues-features.rst
index 9b6602f9..9b6602f9 100644
--- a/docs/contributing/rst-issues-features.rst
+++ b/docs/_rst_legacy/contributing/rst-issues-features.rst
diff --git a/docs/contributing/rst-testing.rst b/docs/_rst_legacy/contributing/rst-testing.rst
index 78860c06..78860c06 100644
--- a/docs/contributing/rst-testing.rst
+++ b/docs/_rst_legacy/contributing/rst-testing.rst
diff --git a/docs/contributing/rst-upstream-packages.rst b/docs/_rst_legacy/contributing/rst-upstream-packages.rst
index 5c48bbb3..5c48bbb3 100644
--- a/docs/contributing/rst-upstream-packages.rst
+++ b/docs/_rst_legacy/contributing/rst-upstream-packages.rst
diff --git a/docs/installation/cloud/rst-aws-ha.rst b/docs/_rst_legacy/installation/cloud/rst-aws-ha.rst
index af125969..af125969 100755
--- a/docs/installation/cloud/rst-aws-ha.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-aws-ha.rst
diff --git a/docs/installation/cloud/rst-aws-to-azure.rst b/docs/_rst_legacy/installation/cloud/rst-aws-to-azure.rst
index 81651feb..81651feb 100755
--- a/docs/installation/cloud/rst-aws-to-azure.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-aws-to-azure.rst
diff --git a/docs/installation/cloud/rst-azure-ha.rst b/docs/_rst_legacy/installation/cloud/rst-azure-ha.rst
index e943b550..e943b550 100755
--- a/docs/installation/cloud/rst-azure-ha.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-azure-ha.rst
diff --git a/docs/installation/cloud/rst-azure.rst b/docs/_rst_legacy/installation/cloud/rst-azure.rst
index 563fcb19..563fcb19 100644
--- a/docs/installation/cloud/rst-azure.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-azure.rst
diff --git a/docs/installation/cloud/rst-gcp.rst b/docs/_rst_legacy/installation/cloud/rst-gcp.rst
index 0c23353e..0c23353e 100644
--- a/docs/installation/cloud/rst-gcp.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-gcp.rst
diff --git a/docs/installation/cloud/rst-index.rst b/docs/_rst_legacy/installation/cloud/rst-index.rst
index 7a17f18d..7a17f18d 100644
--- a/docs/installation/cloud/rst-index.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-index.rst
diff --git a/docs/installation/cloud/rst-oracel.rst b/docs/_rst_legacy/installation/cloud/rst-oracel.rst
index 72c40127..72c40127 100644
--- a/docs/installation/cloud/rst-oracel.rst
+++ b/docs/_rst_legacy/installation/cloud/rst-oracel.rst
diff --git a/docs/installation/rst-image.rst b/docs/_rst_legacy/installation/rst-image.rst
index 77ca01f9..77ca01f9 100644
--- a/docs/installation/rst-image.rst
+++ b/docs/_rst_legacy/installation/rst-image.rst
diff --git a/docs/installation/rst-index.rst b/docs/_rst_legacy/installation/rst-index.rst
index 97f7d85c..97f7d85c 100644
--- a/docs/installation/rst-index.rst
+++ b/docs/_rst_legacy/installation/rst-index.rst
diff --git a/docs/installation/rst-install.rst b/docs/_rst_legacy/installation/rst-install.rst
index 664e6bc3..664e6bc3 100644
--- a/docs/installation/rst-install.rst
+++ b/docs/_rst_legacy/installation/rst-install.rst
diff --git a/docs/installation/rst-update.rst b/docs/_rst_legacy/installation/rst-update.rst
index 5f75f9db..5f75f9db 100644
--- a/docs/installation/rst-update.rst
+++ b/docs/_rst_legacy/installation/rst-update.rst
diff --git a/docs/installation/rst-vyos-on-baremetal.rst b/docs/_rst_legacy/installation/rst-vyos-on-baremetal.rst
index 783fdf85..783fdf85 100644
--- a/docs/installation/rst-vyos-on-baremetal.rst
+++ b/docs/_rst_legacy/installation/rst-vyos-on-baremetal.rst
diff --git a/docs/installation/virtual/rst-docker.rst b/docs/_rst_legacy/installation/virtual/rst-docker.rst
index 0abb4f26..0abb4f26 100644
--- a/docs/installation/virtual/rst-docker.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-docker.rst
diff --git a/docs/installation/virtual/rst-eve-ng.rst b/docs/_rst_legacy/installation/virtual/rst-eve-ng.rst
index d5134838..d5134838 100644
--- a/docs/installation/virtual/rst-eve-ng.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-eve-ng.rst
diff --git a/docs/installation/virtual/rst-gns3.rst b/docs/_rst_legacy/installation/virtual/rst-gns3.rst
index f95bd9c9..f95bd9c9 100644
--- a/docs/installation/virtual/rst-gns3.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-gns3.rst
diff --git a/docs/installation/virtual/rst-index.rst b/docs/_rst_legacy/installation/virtual/rst-index.rst
index 8b088598..8b088598 100644
--- a/docs/installation/virtual/rst-index.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-index.rst
diff --git a/docs/installation/virtual/rst-libvirt.rst b/docs/_rst_legacy/installation/virtual/rst-libvirt.rst
index 09d2cfed..09d2cfed 100644
--- a/docs/installation/virtual/rst-libvirt.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-libvirt.rst
diff --git a/docs/installation/virtual/rst-proxmox.rst b/docs/_rst_legacy/installation/virtual/rst-proxmox.rst
index e44aa65a..e44aa65a 100644
--- a/docs/installation/virtual/rst-proxmox.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-proxmox.rst
diff --git a/docs/installation/virtual/rst-vmware.rst b/docs/_rst_legacy/installation/virtual/rst-vmware.rst
index a522dc78..a522dc78 100644
--- a/docs/installation/virtual/rst-vmware.rst
+++ b/docs/_rst_legacy/installation/virtual/rst-vmware.rst
diff --git a/docs/introducing/rst-about.rst b/docs/_rst_legacy/introducing/rst-about.rst
index 944ff0a1..944ff0a1 100644
--- a/docs/introducing/rst-about.rst
+++ b/docs/_rst_legacy/introducing/rst-about.rst
diff --git a/docs/introducing/rst-history.rst b/docs/_rst_legacy/introducing/rst-history.rst
index 40b99b02..40b99b02 100644
--- a/docs/introducing/rst-history.rst
+++ b/docs/_rst_legacy/introducing/rst-history.rst
diff --git a/docs/operation/rst-boot-options.rst b/docs/_rst_legacy/operation/rst-boot-options.rst
index 70cdc418..70cdc418 100644
--- a/docs/operation/rst-boot-options.rst
+++ b/docs/_rst_legacy/operation/rst-boot-options.rst
diff --git a/docs/operation/rst-index.rst b/docs/_rst_legacy/operation/rst-index.rst
index 037c9286..037c9286 100644
--- a/docs/operation/rst-index.rst
+++ b/docs/_rst_legacy/operation/rst-index.rst
diff --git a/docs/operation/rst-information.rst b/docs/_rst_legacy/operation/rst-information.rst
index e32e55b4..e32e55b4 100644
--- a/docs/operation/rst-information.rst
+++ b/docs/_rst_legacy/operation/rst-information.rst
diff --git a/docs/operation/rst-password-recovery.rst b/docs/_rst_legacy/operation/rst-password-recovery.rst
index 59f4d7c9..59f4d7c9 100755
--- a/docs/operation/rst-password-recovery.rst
+++ b/docs/_rst_legacy/operation/rst-password-recovery.rst
diff --git a/docs/operation/rst-raid.rst b/docs/_rst_legacy/operation/rst-raid.rst
index 30407718..30407718 100644
--- a/docs/operation/rst-raid.rst
+++ b/docs/_rst_legacy/operation/rst-raid.rst
diff --git a/docs/rst-404.rst b/docs/_rst_legacy/rst-404.rst
index 2ae79f2e..2ae79f2e 100644
--- a/docs/rst-404.rst
+++ b/docs/_rst_legacy/rst-404.rst
diff --git a/docs/rst-coverage.rst b/docs/_rst_legacy/rst-coverage.rst
index 1fb9a153..1fb9a153 100644
--- a/docs/rst-coverage.rst
+++ b/docs/_rst_legacy/rst-coverage.rst
diff --git a/docs/rst-documentation.rst b/docs/_rst_legacy/rst-documentation.rst
index 91f0e42b..91f0e42b 100644
--- a/docs/rst-documentation.rst
+++ b/docs/_rst_legacy/rst-documentation.rst
diff --git a/docs/rst-index.rst b/docs/_rst_legacy/rst-index.rst
index c0a71aa3..c0a71aa3 100644
--- a/docs/rst-index.rst
+++ b/docs/_rst_legacy/rst-index.rst
diff --git a/docs/rst-quick-start.rst b/docs/_rst_legacy/rst-quick-start.rst
index 6935e951..6935e951 100644
--- a/docs/rst-quick-start.rst
+++ b/docs/_rst_legacy/rst-quick-start.rst
diff --git a/docs/troubleshooting/rst-index.rst b/docs/_rst_legacy/troubleshooting/rst-index.rst
index 8a34edd9..8a34edd9 100644
--- a/docs/troubleshooting/rst-index.rst
+++ b/docs/_rst_legacy/troubleshooting/rst-index.rst
diff --git a/docs/_rst_overrides.txt b/docs/_rst_overrides.txt
deleted file mode 100644
index 82df65b0..00000000
--- a/docs/_rst_overrides.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# RST override list
-# One page stem per line (relative to docs/, no extension)
-# Pages listed here will render from rst-<stem>.rst INSTEAD of <stem>.md at build time.
-#
-# Default behaviour: every page builds from its .md primary. Add a stem here
-# only if you specifically want the legacy RST version to render for that page.
-# Initially empty — MD is canonical for all migrated pages.
diff --git a/docs/conf.py b/docs/conf.py
index 7f4bf4eb..386d00a3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,6 +13,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
+import pathlib
import shutil
import sys
sys.path.append(os.path.abspath("./_ext"))
@@ -89,16 +90,9 @@ gettext_uuid = False
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = [
u'_build', 'Thumbs.db', '.DS_Store', '_include/vyos-1x',
- 'rst-*.rst', '**/rst-*.rst',
+ '_rst_legacy',
]
-import pathlib
-_build = pathlib.Path(__file__).parent / '_build'
-if (_build / '_rst_override_state.json').exists() and (_build / '_md_exclude.txt').exists():
- exclude_patterns.extend(
- s for s in (line.strip() for line in (_build / '_md_exclude.txt').read_text().splitlines()) if s
- )
-
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
diff --git a/scripts/swap_sources.py b/scripts/swap_sources.py
deleted file mode 100644
index 8a03085e..00000000
--- a/scripts/swap_sources.py
+++ /dev/null
@@ -1,344 +0,0 @@
-#!/usr/bin/env python3
-"""swap_sources.py — Pre-build swap/restore for the RST override mechanism.
-
-In this repo MD is the canonical source for migrated pages. RST kept around
-under the ``rst-<stem>.rst`` prefix is a *fallback* — only consulted when a
-page is explicitly listed in ``docs/_rst_overrides.txt`` to revert to the
-legacy RST rendering.
-
-This script flips the source files in place at build time so Sphinx renders
-the RST instead of the MD for the listed stems, then restores everything
-after the build.
-
-Usage
------
- python scripts/swap_sources.py --swap # activate RST overrides
- python scripts/swap_sources.py --restore # undo activated overrides
- python scripts/swap_sources.py --dry-run # show what would be activated
- python scripts/swap_sources.py --status # show current state
- python scripts/swap_sources.py --swap --docs-dir /path/to/docs
-
-The ``--swap`` flag name is kept for backward compatibility with the Makefile
-and Read the Docs config; semantically it now applies RST overrides.
-
-Override list
--------------
- docs/_rst_overrides.txt — one stem per line, relative to docs/, comments
- (#) skipped. Pages listed here render from rst-<stem>.rst instead of
- <stem>.md at build time.
-
-State files (in docs/_build/, gitignored)
------------------------------------------
- _rst_override_state.json — records completed RST activations
- _md_exclude.txt — MD source paths to pass to Sphinx exclude_patterns
-"""
-
-import argparse
-import json
-import os
-import sys
-from pathlib import Path
-
-
-# ---------------------------------------------------------------------------
-# Constants
-# ---------------------------------------------------------------------------
-
-STATE_FILE = "_rst_override_state.json"
-EXCLUDE_FILE = "_md_exclude.txt"
-OVERRIDE_LIST_FILE = "_rst_overrides.txt"
-STATE_VERSION = 2 # bumped from 1 when the swap direction was inverted
-
-
-# ---------------------------------------------------------------------------
-# Core helpers
-# ---------------------------------------------------------------------------
-
-def parse_override_list(path: Path) -> list:
- """Read *path* and return a list of stems (comments/blanks skipped).
-
- Returns [] if the file does not exist.
- """
- if not path.exists():
- return []
- stems = []
- for line in path.read_text(encoding="utf-8").splitlines():
- stripped = line.strip()
- if stripped and not stripped.startswith("#"):
- stems.append(stripped)
- return stems
-
-
-def _build_dir(docs_dir: Path) -> Path:
- build = docs_dir / "_build"
- build.mkdir(parents=True, exist_ok=True)
- return build
-
-
-def _state_path(docs_dir: Path) -> Path:
- return docs_dir / "_build" / STATE_FILE
-
-
-def _exclude_path(docs_dir: Path) -> Path:
- return docs_dir / "_build" / EXCLUDE_FILE
-
-
-def _resolve_stem_paths(docs_dir: Path, stem: str):
- """Return (rst_from, rst_to, md_path) as absolute Paths for a given stem."""
- p = Path(stem)
- name = p.name
- parent = p.parent # may be PosixPath('.')
- if str(parent) == ".":
- target_dir = docs_dir
- else:
- target_dir = docs_dir / parent
-
- rst_from = target_dir / f"rst-{name}.rst" # source: rst-prefixed
- rst_to = target_dir / f"{name}.rst" # destination: plain .rst
- md_path = target_dir / f"{name}.md" # MD that will be excluded
- return rst_from, rst_to, md_path
-
-
-# ---------------------------------------------------------------------------
-# do_swap (apply RST overrides)
-# ---------------------------------------------------------------------------
-
-def do_swap(docs_dir: Path) -> None:
- """Rename rst-{name}.rst → {name}.rst for each stem in _rst_overrides.txt.
-
- The matching <stem>.md is recorded in _md_exclude.txt so Sphinx ignores it
- during the build. Validates collisions, records state, writes exclude file.
- Rolls back all completed renames on any failure.
- """
- docs_dir = Path(docs_dir)
- override_list = parse_override_list(docs_dir / OVERRIDE_LIST_FILE)
- if not override_list:
- print("swap_sources: no stems in override list, nothing to do.", file=sys.stderr)
- return
-
- # Stale state: warn and auto-restore first
- state_path = _state_path(docs_dir)
- if state_path.exists():
- print(
- "swap_sources: WARNING — stale override state detected. Auto-restoring before re-applying.",
- file=sys.stderr,
- )
- do_restore(docs_dir)
-
- # Validate all stems before touching the filesystem
- planned = [] # list of (rst_from, rst_to, md_path, stem)
- for stem in override_list:
- rst_from, rst_to, md_path = _resolve_stem_paths(docs_dir, stem)
-
- if not rst_from.exists():
- print(
- f"swap_sources: skipping {stem!r} — rst- source file not found: {rst_from}",
- file=sys.stderr,
- )
- continue
-
- if not md_path.exists():
- print(
- f"swap_sources: skipping {stem!r} — MD file not found: {md_path}",
- file=sys.stderr,
- )
- continue
-
- if rst_to.exists():
- raise RuntimeError(
- f"collision: both rst- and unprefixed .rst exist for stem {stem!r}. "
- f"Remove {rst_to} before applying the override."
- )
-
- planned.append((rst_from, rst_to, md_path, stem))
-
- # Execute renames with rollback on failure
- completed = [] # list of (rst_from, rst_to) that succeeded
- try:
- for rst_from, rst_to, md_path, stem in planned:
- os.rename(rst_from, rst_to)
- completed.append((rst_from, rst_to))
- except Exception as exc:
- # Rollback completed renames in reverse order
- for from_path, to_path in reversed(completed):
- try:
- os.rename(to_path, from_path)
- except Exception as rollback_exc:
- print(
- f"swap_sources: ROLLBACK ERROR for {to_path}: {rollback_exc}",
- file=sys.stderr,
- )
- raise RuntimeError(f"swap_sources: rename failed, rolled back. Cause: {exc}") from exc
-
- if not completed:
- return
-
- # Build state and exclude data using relative paths (relative to docs_dir)
- _build_dir(docs_dir)
- overrides = []
- exclude_lines = []
- for rst_from, rst_to, md_path, stem in planned:
- rel_from = rst_from.relative_to(docs_dir)
- rel_to = rst_to.relative_to(docs_dir)
- rel_md = md_path.relative_to(docs_dir)
- overrides.append({
- "stem": stem,
- "rst_from": str(rel_from),
- "rst_to": str(rel_to),
- "md_excluded": str(rel_md),
- })
- exclude_lines.append(str(rel_md))
-
- state = {"version": STATE_VERSION, "overrides": overrides}
- state_path.write_text(json.dumps(state, indent=2), encoding="utf-8")
- _exclude_path(docs_dir).write_text("\n".join(exclude_lines) + "\n", encoding="utf-8")
-
- print(f"swap_sources: applied {len(completed)} RST override(s).", file=sys.stderr)
-
-
-# ---------------------------------------------------------------------------
-# do_restore
-# ---------------------------------------------------------------------------
-
-def do_restore(docs_dir: Path) -> None:
- """Undo all renames recorded in _rst_override_state.json (reverse order)."""
- docs_dir = Path(docs_dir)
- state_path = _state_path(docs_dir)
-
- if not state_path.exists():
- return # no-op
-
- try:
- state = json.loads(state_path.read_text(encoding="utf-8"))
- except (json.JSONDecodeError, OSError) as exc:
- raise RuntimeError(
- f"swap_sources: cannot read state file {state_path}: {exc}. "
- f"Inspect or delete it manually."
- ) from exc
-
- version = state.get("version")
- if version != STATE_VERSION:
- raise RuntimeError(
- f"swap_sources: state file version {version!r} does not match "
- f"expected {STATE_VERSION!r}. Inspect {state_path} manually."
- )
-
- overrides = state.get("overrides", [])
-
- for entry in reversed(overrides):
- if not isinstance(entry, dict) or "rst_from" not in entry or "rst_to" not in entry:
- raise RuntimeError(
- f"swap_sources: malformed entry in {state_path}: {entry!r}. "
- f"Inspect manually."
- )
- rst_from = docs_dir / entry["rst_from"] # original source (rst-prefixed)
- rst_to = docs_dir / entry["rst_to"] # current location (plain .rst)
- if rst_to.exists():
- os.rename(rst_to, rst_from)
- else:
- print(
- f"swap_sources: WARNING — expected overridden file not found: {rst_to}",
- file=sys.stderr,
- )
-
- # Clean up state and exclude files
- state_path.unlink(missing_ok=True)
- exclude_path = _exclude_path(docs_dir)
- exclude_path.unlink(missing_ok=True)
-
- print(f"swap_sources: restored {len(overrides)} RST override(s).", file=sys.stderr)
-
-
-# ---------------------------------------------------------------------------
-# do_dry_run / do_status
-# ---------------------------------------------------------------------------
-
-def do_dry_run(docs_dir: Path) -> None:
- """Print what would be activated without making any changes."""
- docs_dir = Path(docs_dir)
- override_list = parse_override_list(docs_dir / OVERRIDE_LIST_FILE)
- if not override_list:
- print("(dry-run) No stems in override list.")
- return
-
- for stem in override_list:
- rst_from, rst_to, md_path = _resolve_stem_paths(docs_dir, stem)
- issues = []
- if not rst_from.exists():
- issues.append("rst- source missing")
- if not md_path.exists():
- issues.append("MD missing")
- if rst_to.exists():
- issues.append("COLLISION: plain .rst already exists")
- if issues:
- print(f" SKIP {stem}: {', '.join(issues)}")
- else:
- rel_dir = rst_from.parent.relative_to(docs_dir) if rst_from.parent != docs_dir else "."
- print(f" APPLY {rst_from.name} → {rst_to.name} (in {rel_dir})")
-
-
-def do_status(docs_dir: Path) -> None:
- """Show current override state."""
- docs_dir = Path(docs_dir)
- state_path = _state_path(docs_dir)
- if not state_path.exists():
- print("swap_sources: no active RST overrides.")
- return
-
- state = json.loads(state_path.read_text(encoding="utf-8"))
- overrides = state.get("overrides", [])
- print(f"swap_sources: {len(overrides)} RST override(s) currently active:")
- for entry in overrides:
- print(f" {entry['rst_from']} → {entry['rst_to']} (excludes {entry['md_excluded']})")
-
-
-# ---------------------------------------------------------------------------
-# CLI
-# ---------------------------------------------------------------------------
-
-def main(argv=None):
- parser = argparse.ArgumentParser(
- description="Activate rst-prefixed RST files as the build source for stems "
- "listed in docs/_rst_overrides.txt."
- )
- group = parser.add_mutually_exclusive_group(required=True)
- group.add_argument("--swap", action="store_true",
- help="Apply RST overrides (rename rst-<stem>.rst → <stem>.rst)")
- group.add_argument("--restore", action="store_true",
- help="Restore original files after a previous --swap")
- group.add_argument("--dry-run", action="store_true",
- help="Show what would be applied")
- group.add_argument("--status", action="store_true",
- help="Show current override state")
-
- parser.add_argument(
- "--docs-dir",
- type=Path,
- default=None,
- help="Path to docs/ directory (default: auto-detected from script location)",
- )
-
- args = parser.parse_args(argv)
-
- if args.docs_dir is None:
- # Default: repo_root/docs where repo_root = parent of scripts/
- repo_root = Path(__file__).resolve().parent.parent
- docs_dir = repo_root / "docs"
- else:
- docs_dir = args.docs_dir.resolve()
-
- if not docs_dir.is_dir():
- parser.error(f"docs directory not found: {docs_dir}")
-
- if args.swap:
- do_swap(docs_dir)
- elif args.restore:
- do_restore(docs_dir)
- elif args.dry_run:
- do_dry_run(docs_dir)
- elif args.status:
- do_status(docs_dir)
-
-
-if __name__ == "__main__":
- main()
diff --git a/tests/test_swap_sources.py b/tests/test_swap_sources.py
deleted file mode 100644
index 7e9f68be..00000000
--- a/tests/test_swap_sources.py
+++ /dev/null
@@ -1,245 +0,0 @@
-"""Tests for swap_sources.py — run with:
- cd tests && PYTHONPATH=../scripts python -m pytest test_swap_sources.py -v
-
-In the inverted model MD is the canonical source for migrated pages and RST
-under the ``rst-<stem>.rst`` prefix is a fallback used only for stems listed
-in ``docs/_rst_overrides.txt``. ``do_swap`` activates the override (renames
-``rst-<stem>.rst`` → ``<stem>.rst`` and excludes ``<stem>.md``); ``do_restore``
-undoes that.
-"""
-import json
-import os
-from pathlib import Path
-
-import pytest
-
-
-# ---------------------------------------------------------------------------
-# Helper
-# ---------------------------------------------------------------------------
-
-def _setup_docs(tmp_path: Path, stems: list[str]) -> Path:
- """Create a minimal docs/ tree with MD primary + rst-prefixed RST for each stem."""
- docs = tmp_path / "docs"
- for stem in stems:
- p = Path(stem)
- name = p.name
- parent = p.parent # may be "." for flat stems
- target_dir = docs / parent if str(parent) != "." else docs
- target_dir.mkdir(parents=True, exist_ok=True)
- # MD file is the canonical source after the flip.
- (target_dir / f"{name}.md").write_text(f"# {name}\nDummy MyST for {stem}\n")
- # rst-prefixed RST file waiting to be activated as an override.
- (target_dir / f"rst-{name}.rst").write_text(f".. _{name}:\n\nDummy RST for {stem}\n")
- return docs
-
-
-# ---------------------------------------------------------------------------
-# parse_override_list
-# ---------------------------------------------------------------------------
-
-def test_parse_override_list_basic(tmp_path):
- from swap_sources import parse_override_list
-
- overrides_txt = tmp_path / "_rst_overrides.txt"
- overrides_txt.write_text(
- "# comment\n"
- "\n"
- "configuration/firewall/zone\n"
- " quick-start \n" # leading/trailing whitespace
- "# another comment\n"
- "installation/virtual/vmware\n"
- )
- stems = parse_override_list(overrides_txt)
- assert stems == [
- "configuration/firewall/zone",
- "quick-start",
- "installation/virtual/vmware",
- ]
-
-
-def test_parse_override_list_empty(tmp_path):
- from swap_sources import parse_override_list
-
- missing = tmp_path / "_rst_overrides.txt"
- assert parse_override_list(missing) == []
-
-
-# ---------------------------------------------------------------------------
-# do_swap (apply RST overrides)
-# ---------------------------------------------------------------------------
-
-def test_swap_renames_files(tmp_path):
- from swap_sources import do_swap
-
- stems = ["quick-start"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\n")
-
- do_swap(docs)
-
- assert (docs / "quick-start.rst").exists(), "rst- file should be renamed to plain .rst"
- assert not (docs / "rst-quick-start.rst").exists(), "rst- prefix file should be gone"
- assert (docs / "quick-start.md").exists(), "MD file should still exist (just excluded)"
-
-
-def test_swap_creates_state_file(tmp_path):
- from swap_sources import do_swap
-
- stems = ["quick-start"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\n")
-
- do_swap(docs)
-
- state_file = docs / "_build" / "_rst_override_state.json"
- assert state_file.exists(), "state file should be created in _build/"
-
- state = json.loads(state_file.read_text())
- assert state["version"] == 2
- assert len(state["overrides"]) == 1
-
- entry = state["overrides"][0]
- assert entry["stem"] == "quick-start"
- assert "rst_from" in entry
- assert "rst_to" in entry
- assert "md_excluded" in entry
-
-
-def test_swap_creates_exclude_file(tmp_path):
- from swap_sources import do_swap
-
- stems = ["quick-start"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\n")
-
- do_swap(docs)
-
- exclude_file = docs / "_build" / "_md_exclude.txt"
- assert exclude_file.exists(), "exclude file should be created in _build/"
-
- lines = [l.strip() for l in exclude_file.read_text().splitlines() if l.strip()]
- assert "quick-start.md" in lines
-
-
-# ---------------------------------------------------------------------------
-# do_restore
-# ---------------------------------------------------------------------------
-
-def test_restore_undoes_renames(tmp_path):
- from swap_sources import do_restore, do_swap
-
- stems = ["quick-start"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\n")
-
- do_swap(docs)
- assert (docs / "quick-start.rst").exists()
-
- do_restore(docs)
-
- assert (docs / "rst-quick-start.rst").exists(), "rst- prefix file should be restored"
- assert not (docs / "quick-start.rst").exists(), "plain .rst should be gone after restore"
- assert (docs / "quick-start.md").exists(), "MD file should remain untouched throughout"
-
- state_file = docs / "_build" / "_rst_override_state.json"
- exclude_file = docs / "_build" / "_md_exclude.txt"
- assert not state_file.exists(), "state file should be deleted after restore"
- assert not exclude_file.exists(), "exclude file should be deleted after restore"
-
-
-def test_restore_noop_without_state(tmp_path):
- from swap_sources import do_restore
-
- docs = tmp_path / "docs"
- docs.mkdir()
- # Should not raise even with no state file
- do_restore(docs) # no error = pass
-
-
-# ---------------------------------------------------------------------------
-# Collision / validation
-# ---------------------------------------------------------------------------
-
-def test_swap_fails_on_collision(tmp_path):
- from swap_sources import do_swap
-
- stems = ["quick-start", "cli"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\ncli\n")
-
- # Simulate a collision: unprefixed .rst already exists for "cli"
- (docs / "cli.rst").write_text(".. _cli:\nCollision RST\n")
-
- with pytest.raises(RuntimeError, match="collision"):
- do_swap(docs)
-
- # Rollback: first stem's rename should be undone
- assert (docs / "rst-quick-start.rst").exists(), "rollback should undo completed renames"
- assert not (docs / "quick-start.rst").exists(), "renamed file should not exist after rollback"
-
- # State file should NOT be written on failure
- state_file = docs / "_build" / "_rst_override_state.json"
- assert not state_file.exists(), "no state file should be written on failure"
-
-
-# ---------------------------------------------------------------------------
-# Rollback on rename failure (monkeypatched os.rename)
-# ---------------------------------------------------------------------------
-
-def test_swap_rollback_on_rename_failure(tmp_path, monkeypatch):
- """If os.rename raises on the second call, the first rename must be undone."""
- from swap_sources import do_swap
-
- stems = ["quick-start", "cli"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("quick-start\ncli\n")
-
- call_count = {"n": 0}
- real_rename = os.rename
-
- def failing_rename(src, dst):
- call_count["n"] += 1
- if call_count["n"] == 2:
- raise OSError("simulated rename failure")
- real_rename(src, dst)
-
- monkeypatch.setattr(os, "rename", failing_rename)
-
- with pytest.raises(RuntimeError):
- do_swap(docs)
-
- # First rename (quick-start) should have been rolled back
- assert (docs / "rst-quick-start.rst").exists(), "rollback should undo the first rename"
- assert not (docs / "quick-start.rst").exists(), "renamed file should not exist after rollback"
-
- # No state file should exist
- assert not (docs / "_build" / "_rst_override_state.json").exists()
-
-
-# ---------------------------------------------------------------------------
-# Nested paths
-# ---------------------------------------------------------------------------
-
-def test_swap_nested_paths(tmp_path):
- from swap_sources import do_swap, do_restore
-
- stems = ["configuration/firewall/zone"]
- docs = _setup_docs(tmp_path, stems)
- (docs / "_rst_overrides.txt").write_text("configuration/firewall/zone\n")
-
- do_swap(docs)
-
- activated = docs / "configuration" / "firewall" / "zone.rst"
- rst_source = docs / "configuration" / "firewall" / "rst-zone.rst"
- assert activated.exists(), "nested rst file should be renamed"
- assert not rst_source.exists()
-
- exclude_file = docs / "_build" / "_md_exclude.txt"
- lines = [l.strip() for l in exclude_file.read_text().splitlines() if l.strip()]
- assert "configuration/firewall/zone.md" in lines
-
- do_restore(docs)
-
- assert rst_source.exists(), "nested rst- file should be restored"
- assert not activated.exists()