summaryrefslogtreecommitdiff
path: root/docs/conf.py
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 /docs/conf.py
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)
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py10
1 files changed, 2 insertions, 8 deletions
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'