diff options
| author | Quill Cronwall <quilljazz@gmail.com> | 2026-05-11 20:12:50 +0900 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2026-05-12 06:00:17 +0000 |
| commit | 79906ff29adfe59e61802dadfe846aa2e52e4289 (patch) | |
| tree | d00f9e3618249ad03878b07ca2b8114436720102 /docs | |
| parent | 9673f0dc1082ef993d3d3c491361fa08570ec29c (diff) | |
| download | vyos-documentation-79906ff29adfe59e61802dadfe846aa2e52e4289.tar.gz vyos-documentation-79906ff29adfe59e61802dadfe846aa2e52e4289.zip | |
Fix recursive _build directory nesting error
(cherry picked from commit ec6f33f3c256e839b443bb2baac14bff32132811)
# Conflicts:
# docs/conf.py
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/conf.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index 386d00a3..2cfbd385 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -292,6 +292,24 @@ def _write_llms_txt(app, exception): out_path.write_text(rendered, encoding='utf-8') +<<<<<<< HEAD +======= +def _copy_md_sources(app, exception): + """Copy .md source files verbatim into the HTML output tree.""" + if exception is not None: + return + src = pathlib.Path(app.srcdir) + out = pathlib.Path(app.outdir) + for path in src.rglob("*.md"): + # Skip files in excluded directories to prevent recursive nesting + if any(part in {'_build', '_rst_legacy'} for part in path.parts): + continue + dest = out / path.relative_to(src) + dest.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(path, dest) + + +>>>>>>> ec6f33f3 (Fix recursive _build directory nesting error) def setup(app): app.connect('builder-inited', _prefer_webp) app.connect('build-finished', _copy_md_sources) |
