diff --git a/docs/es/overrides/.gitignore b/docs/es/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/fr/overrides/.gitignore b/docs/fr/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/it/overrides/.gitignore b/docs/it/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/ja/overrides/.gitignore b/docs/ja/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/ko/overrides/.gitignore b/docs/ko/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/pt/overrides/.gitignore b/docs/pt/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/ru/overrides/.gitignore b/docs/ru/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/sq/overrides/.gitignore b/docs/sq/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/tr/overrides/.gitignore b/docs/tr/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/uk/overrides/.gitignore b/docs/uk/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/docs/zh/overrides/.gitignore b/docs/zh/overrides/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/docs.py b/scripts/docs.py index 00b6c8318..b8d162f63 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -136,7 +136,12 @@ def build_lang( shutil.rmtree(build_lang_path, ignore_errors=True) shutil.copytree(lang_path, build_lang_path) shutil.copytree(en_docs_path / "data", build_lang_path / "data") - shutil.copytree(en_docs_path / "overrides", build_lang_path / "overrides") + overrides_src = en_docs_path / "overrides" + overrides_dest = build_lang_path / "overrides" + for path in overrides_src.iterdir(): + dest_path = overrides_dest / path.name + if not dest_path.exists(): + shutil.copy(path, dest_path) en_config_path: Path = en_lang_path / mkdocs_name en_config: dict = mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) nav = en_config["nav"]