A documentation is a tree: MkNav objects are the sections,
MkPage objects the pages, nodes the content of a page. Nodes get added
with +=, navs and pages with add_nav() / add_page() (or via decorators, see
Routing). The root nav is what a build function receives.
importmknodesasmknav=mk.MkNav()# the root navpage=nav.add_page("Usage",is_index=True,hide="toc")page+=mk.MkAdmonition("Install with `pip install mknodes`.",typ="tip")guides=nav.add_nav("Guides")first_steps=guides.add_page("First steps")first_steps+="Some text"
A nav is named (exception is the root nav, which has section name = None),
has an associated virtual file (in general a SUMMARY.md),
an optional index page and can contain other navs as well as pages and links.
created:source_filename:/home/runner/work/mknodes/mknodes/src/mknodes/manual/api_section.pysource_function:_add_page.<locals>._source_line_no:168hide:-toctitle:Navs and pages