90 lines
5.5 KiB
JSON
90 lines
5.5 KiB
JSON
{
|
|
"module": "docforge.nav.resolver",
|
|
"content": {
|
|
"path": "docforge.nav.resolver",
|
|
"docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---",
|
|
"objects": {
|
|
"NavSpec": {
|
|
"name": "NavSpec",
|
|
"kind": "class",
|
|
"path": "docforge.nav.resolver.NavSpec",
|
|
"signature": "NavSpec(home: str | None, groups: dict[str, list[str]], icon: dict[str, str] | None = None)",
|
|
"docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.",
|
|
"members": {
|
|
"home": {
|
|
"name": "home",
|
|
"kind": "attribute",
|
|
"path": "docforge.nav.resolver.NavSpec.home",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"groups": {
|
|
"name": "groups",
|
|
"kind": "attribute",
|
|
"path": "docforge.nav.resolver.NavSpec.groups",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"kind": "attribute",
|
|
"path": "docforge.nav.resolver.NavSpec.icon",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"load": {
|
|
"name": "load",
|
|
"kind": "function",
|
|
"path": "docforge.nav.resolver.NavSpec.load",
|
|
"signature": "load(path: Path)",
|
|
"docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification."
|
|
},
|
|
"all_patterns": {
|
|
"name": "all_patterns",
|
|
"kind": "function",
|
|
"path": "docforge.nav.resolver.NavSpec.all_patterns",
|
|
"signature": "all_patterns()",
|
|
"docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries."
|
|
}
|
|
}
|
|
},
|
|
"ResolvedNav": {
|
|
"name": "ResolvedNav",
|
|
"kind": "class",
|
|
"path": "docforge.nav.resolver.ResolvedNav",
|
|
"signature": "ResolvedNav(home: str | None, groups: dict[str, list[Path]], docs_root: Path | None = None)",
|
|
"docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.",
|
|
"members": {
|
|
"home": {
|
|
"name": "home",
|
|
"kind": "attribute",
|
|
"path": "docforge.nav.resolver.ResolvedNav.home",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"groups": {
|
|
"name": "groups",
|
|
"kind": "attribute",
|
|
"path": "docforge.nav.resolver.ResolvedNav.groups",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"all_files": {
|
|
"name": "all_files",
|
|
"kind": "function",
|
|
"path": "docforge.nav.resolver.ResolvedNav.all_files",
|
|
"signature": "all_files() -> Iterable[Path]",
|
|
"docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution."
|
|
}
|
|
}
|
|
},
|
|
"resolve_nav": {
|
|
"name": "resolve_nav",
|
|
"kind": "function",
|
|
"path": "docforge.nav.resolver.resolve_nav",
|
|
"signature": "resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav",
|
|
"docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files."
|
|
}
|
|
}
|
|
}
|
|
} |