This commit is contained in:
LASTA_DEV01\lasta
2026-05-13 19:57:34 +09:00
parent 2e9204243d
commit 9e88f4c7ad
4310 changed files with 48538 additions and 905279 deletions

View File

@@ -0,0 +1,26 @@
from pathlib import Path
import mkdocs_gen_files
nav = mkdocs_gen_files.Nav()
pname = "ontocast"
for path in sorted(Path(pname).rglob("*.py")):
module_path = path.relative_to(pname).with_suffix("")
doc_path = path.relative_to(pname).with_suffix(".md")
full_doc_path = Path("reference", doc_path)
parts = list(module_path.parts)
if parts[-1] == "__init__":
parts = parts[:-1]
if not parts:
continue
parts_str: tuple[str, ...] = tuple(parts)
nav[parts_str] = str(full_doc_path)
with mkdocs_gen_files.open(full_doc_path, "w") as f:
ident = ".".join([pname] + parts)
f.write(f"# `{ident}`\n\n::: {ident}\n")
mkdocs_gen_files.set_edit_path(full_doc_path, path)