Skip to content

generate

generate

Generate the site input (pages, nav, assets, config) for the site engine.

Runs the build function (mkdocs_mknodes:parse / the default website unless configured in [tool.mknodes] of pyproject.toml or in the mknodes entry of the plugins list of mkdocs.yml) and writes the generated pages into the docs dir plus a generated config (mkdocs.generated.yml) inheriting from mkdocs.yml. Build afterwards with zensical build -f mkdocs.generated.yml.

mknodes generate [OPTIONS]

--repo-url, -r

Repository URL of the target package. Can be remote or local.

--build-fn, -b

Path to the build script. (form: path.to.module:function )

--clone-depth, -c

Git clone depth in case repository is remote. Important for changelog generation.

--config-path, -p

Default: mkdocs.yml Path to the config file.

--engine, -e

Default: zensical Site engine. Only zensical (the default) is supported.

--generated-dir

Folder for generated pages (default: the docs dir).

--watch, -w

:mdi-flag: Flag Keep running and regenerate when project sources change.

--verbose, -v

:mdi-flag: Flag Enable verbose output. (DEBUG level)

--quiet, -q

:mdi-flag: Flag Suppress output during build.

--help

:mdi-flag: Flag Show this message and exit.

Page info
Code for this page
mkdocs_mknodes.manual.cli_section._
@nav.route.page("generate", icon="file-tree")
def _(page: mk.MkPage):
    page += mk.MkCliDoc(CLI_PATH, prog_name="generate")
Resources
Resources(css=[],
          markdown_extensions={},
          plugins=[],
          js=[],
          assets=[Asset('materialbadge_31c4bf6.css')],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mkdocs-mknodes/mkdocs-mknodes/.venv/lib/python3.13/site-packages/anyenv/async_run.py
  source_function: run_sync.<locals>.wrapper
  source_line_no: 52
icon: material/file-tree
title: generate