summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-04-27 06:08:56 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-06 16:18:03 +0300
commit8a7fb07ccb8ebee5cf5e9cc3d1b0c51212aef548 (patch)
treeb65ed16902a08870c6ad18a20e3b1a7613ebe684
parent1396d89137d5a6e6702a5696f9ea9fe63b5a8366 (diff)
downloadvyos-documentation-8a7fb07ccb8ebee5cf5e9cc3d1b0c51212aef548.tar.gz
vyos-documentation-8a7fb07ccb8ebee5cf5e9cc3d1b0c51212aef548.zip
feat: add MyST swap exclude patterns and directive config to conf.py
🤖 Generated by [robots](https://vyos.io)
-rw-r--r--docs/conf.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 78bc8ec1..62982333 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -66,6 +66,9 @@ autosectionlabel_prefix_document = True
# source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md']
+myst_enable_extensions = ["colon_fence", "deflist", "fieldlist", "substitution"]
+myst_fence_as_directive = ["cfgcmd", "opcmd", "cmdincludemd"]
+
# The master toctree document.
master_doc = 'index'
@@ -85,7 +88,14 @@ gettext_uuid = False
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
-exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', '_include/vyos-1x']
+exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', '_include/vyos-1x', '**/md-*.md']
+
+import pathlib
+_build = pathlib.Path(__file__).parent / '_build'
+if (_build / '_swap_state.json').exists() and (_build / '_swap_exclude.txt').exists():
+ exclude_patterns.extend(
+ s for s in (line.strip() for line in (_build / '_swap_exclude.txt').read_text().splitlines()) if s
+ )
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'