Skip to content

Commit

Permalink
Remove top level hikari reference page
Browse files Browse the repository at this point in the history
  • Loading branch information
davfsa committed Jan 21, 2024
1 parent a00b1cc commit c0ccd6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
continue
elif parts[-1] == "__init__":
parts = parts[:-1]
if len(parts) == 1:
continue

# Make the __init__.py the index page of the module
doc_path = doc_path.with_name("index.md")
full_doc_path = full_doc_path.with_name("index.md")
Expand All @@ -47,10 +50,13 @@

with mkdocs_gen_files.open("reference/summary.md", "w") as nav_file:
for item in nav.items():
if not item.filename:
continue

path = pathlib.Path(item.filename).with_suffix("")

if path.name == "index":
path = path.parent

full_name = ".".join(path.parts)
nav_file.write(" " * item.level + f"* [{full_name}]({item.filename})\n")
nav_file.write(" " * (item.level - 1) + f"* [{full_name}]({item.filename})\n")

0 comments on commit c0ccd6c

Please sign in to comment.