Skip to content

Commit

Permalink
Remove nav so that it is autogenerated
Browse files Browse the repository at this point in the history
  • Loading branch information
kabilar committed Jan 16, 2025
1 parent fb96424 commit 040f65a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -52,7 +46,6 @@ plugins:
scripts:
- scripts/gen_ref_pages.py
- literate-nav:
nav_file: api.md
- mkdocstrings:
handlers:
python:
Expand Down
6 changes: 3 additions & 3 deletions docs/scripts/gen_ref_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand All @@ -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())

0 comments on commit 040f65a

Please sign in to comment.