summaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-10 17:19:31 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-10 17:19:31 +0300
commit3fd1787d50dda76619647dd95ea6e1d421204734 (patch)
tree3e4f5341e2b4c5618ba1fa6b52a5cda63c4c1c29 /docs/Makefile
parentd7e63e1923814a791dadf93453e8c090d26ca896 (diff)
downloadvyos-documentation-3fd1787d50dda76619647dd95ea6e1d421204734.tar.gz
vyos-documentation-3fd1787d50dda76619647dd95ea6e1d421204734.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 (#1899/#1900/#1901) landed in May 2026. The mechanism's surface area (scripts/swap_sources.py, its 245-line test, RTD pre/post hooks, Makefile glue, conf.py dynamic loader) is dead weight, and the rst-*.rst shadows scattered across the source tree cause Context7's parser to misclassify the project as RST. Changes: - Move 253 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; Context7 excludes it via excludeFolders. - Strip swap_sources.py invocation from docs/Makefile (swap/restore targets, : swap deps, trap chains). - Strip jobs: pre_build/post_build block from .readthedocs.yml. - 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 context7.json: add docs/_rst_legacy to excludeFolders; fix stale "Branch current tracks…" rule to "Branch rolling tracks…" (default branch was renamed 2026-05-10). - Update AGENTS.md: drop the "RST override mechanism" section and the test-runner snippet for the deleted test; describe _rst_legacy as archive only. Verified: sphinx-build -b html with --keep-going produces identical warning set (68 unique), identical sitemap entry count (257), identical llms.txt entry count (22), zero rst-* URLs in any artifact. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile30
1 files changed, 9 insertions, 21 deletions
diff --git a/docs/Makefile b/docs/Makefile
index d27936c2..0b942ddb 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -11,35 +11,23 @@ BUILDDIR = _build
AUTOHOST = 0.0.0.0
AUTOPORT = 8000
-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-*' \