Skip to content

Commit 9b2a5d7

Browse files
committed
use a symlink for the mkdocs.yaml file so changes are auto applied
1 parent f03955e commit 9b2a5d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

rats-devtools/src/rats/docs/_app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def _do_mkdocs_things(self, cmd: str) -> None:
7777
mkdocs_config = docs_component.find_path("mkdocs.yaml")
7878
mkdocs_staging_path = docs_component.find_path("dist/docs")
7979
site_dir_path = docs_component.find_path("dist/site")
80-
mkdocs_staging_config = docs_component.find_path("dist/mkdocs.yaml")
80+
# we append the filename because symlinks get resolved by `find_path()`
81+
mkdocs_staging_config = docs_component.find_path("dist") / "mkdocs.yaml"
8182
# clear any stale state
8283
docs_component.create_or_empty(mkdocs_staging_path)
8384
# start with the contents of our root-docs
@@ -91,7 +92,7 @@ def _do_mkdocs_things(self, cmd: str) -> None:
9192

9293
# replace the mkdocs config with a fresh version
9394
mkdocs_staging_config.unlink(missing_ok=True)
94-
docs_component.copy(mkdocs_config, mkdocs_staging_config)
95+
docs_component.symlink(mkdocs_config, mkdocs_staging_config)
9596

9697
args = [
9798
"--config-file",

0 commit comments

Comments
 (0)