跳到主要内容
MkDocs Primer Theme
Chinese

Reference

The theme has no Python API to call — the package below exists only to carry the templates and the mkdocs.themes entry point. It is rendered here by mkdocstrings so that the theme's handling of that plugin's markup is exercised on every build.

The primer MkDocs theme.

This package is templates, CSS and one small script — there is no Python API to call. It exists so that MkDocs can find the theme through the mkdocs.themes entry point declared in pyproject.toml:

[project.entry-points."mkdocs.themes"]
primer = "mkdocs_primer"

MkDocs resolves that entry point to this package's directory and loads mkdocs_theme.yml from it for the theme's default options. Selecting the theme is therefore all the wiring a site needs:

theme:
  name: primer