diff --git a/docs.py b/docs.py index 2b81ab6d4..bd52b8f3d 100755 --- a/docs.py +++ b/docs.py @@ -27,12 +27,12 @@ app = typer.Typer() -alternate_langs_config_name = "mkdocs-alternate-langs.yml" +mkdocs_config_name = "mkdocs.yml" docs_folder_name = "help" docs_path = Path("help") en_docs_path = Path("help/en") -alternate_langs_config_path: Path = Path(alternate_langs_config_name) +alternate_langs_config_path: Path = Path("mkdocs-alternate-langs.yml") site_path = Path("site").absolute() build_site_path = Path("site_build").absolute() @@ -88,7 +88,7 @@ def new_lang(lang: str = typer.Argument(..., callback=lang_callback)): typer.echo(f"The language was already created: {lang}") raise typer.Abort() new_path.mkdir() - new_config_path: Path = Path(new_path) / alternate_langs_config_name + new_config_path: Path = Path(new_path) / mkdocs_config_name new_config_path.write_text(get_mkdocs_yaml_for_lang(lang), encoding="utf-8") new_config_docs_path: Path = language_docs_dir(lang) new_config_docs_path.mkdir() diff --git a/mkdocs-utils/hooks.py b/mkdocs-utils/hooks.py index ba2eb372f..3da330663 100644 --- a/mkdocs-utils/hooks.py +++ b/mkdocs-utils/hooks.py @@ -112,14 +112,14 @@ def generate_renamed_section_items( def on_nav( - nav: Navigation, *, config: MkDocsConfig, _: Files + nav: Navigation, *, config: MkDocsConfig, **_: Any ) -> Navigation: new_items = generate_renamed_section_items(nav.items, config=config) return Navigation(items=new_items, pages=nav.pages) def on_page_markdown( - markdown: str, *, page: Page, config: MkDocsConfig + markdown: str, *, page: Page, config: MkDocsConfig, **_: Any ) -> str: if isinstance(page.file, EnFile): for excluded_section in non_translated_sections: