跳到主要内容
MkDocs Primer Theme
Chinese

参考

本主题没有可供调用的 Python API——下面的软件包只是用来承载模板和 mkdocs.themes 入口点。它在这里由 mkdocstrings 渲染,以便每次构建都能检验主题对该插件所输出标记的处理。

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