diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 34948497..a8d78f44 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -29,12 +29,6 @@ theme: features: - toc.integrate -nav: - - Welcome: "index.md" - - API: api/ - - Contribute documentation: "contribute.md" - - About this doc: "about.md" - markdown_extensions: - admonition - pymdownx.details @@ -52,7 +46,6 @@ plugins: scripts: - scripts/gen_ref_pages.py - literate-nav: - nav_file: api.md - mkdocstrings: handlers: python: diff --git a/docs/scripts/gen_ref_pages.py b/docs/scripts/gen_ref_pages.py index 299dc3ca..aa6f8e23 100644 --- a/docs/scripts/gen_ref_pages.py +++ b/docs/scripts/gen_ref_pages.py @@ -11,8 +11,8 @@ for path in sorted(src.rglob("*.py")): module_path = path.relative_to(src).with_suffix("") - doc_path = path.relative_to(src).with_suffix(".md") - full_doc_path = Path(root, "docs/api", doc_path) + doc_path = "api" / path.relative_to(src).with_suffix(".md") + full_doc_path = Path(root, "docs", doc_path) parts = tuple(module_path.parts) if parts[-1] == "__init__": @@ -28,5 +28,5 @@ mkdocs_gen_files.set_edit_path(full_doc_path, path.relative_to(root)) -with mkdocs_gen_files.open(root / "docs/api/api.md", "w") as nav_file: +with mkdocs_gen_files.open(root / "docs/api.md", "w") as nav_file: nav_file.writelines(nav.build_literate_nav())