Creating a website via config
It is possible to construct a basic documentation website without writing any Python code by
describing the node tree in the config. The default build function (mknodes.site:parse)
builds the nav from the pages setting.
The following config...
# pyproject.toml
[[tool.mknodes.pages]]
title = "Home"
type = "MkText"
text = "{{ metadata.description }}"
is_index = true
[[tool.mknodes.pages]]
Usage = [
{ title = "Getting started", type = "MkText", text = "Install the package and import it." },
{ title = "Changelog", type = "MkChangelog" },
]
[[tool.mknodes.pages]]
title = "API"
type = "MkDoc"
section_name = "API"
recursive = true
[[tool.mknodes.pages]]
title = "CLI"
type = "MkCliDoc"
show_subcommands = true
condition = "{{ metadata.cli }}"
[[tool.mknodes.pages]]
Development = [
{ title = "Contributing", type = "MkCommitConventions" },
{ title = "Dependencies", type = "MkDependencyTable" },
{ title = "License", type = "MkLicense" },
]
Combined with this CLI call...
...creates a website with a home page, a usage section, API docs, a CLI page (if the project has a CLI) and a development section.