1 min read
pyssg.presets.docs
docs preset: a ready-to-use documentation site.
A preset is a pure factory that returns a fully populated :class:~pyssg.Config,
bundling the right set of built-in plugins in the right apply order plus a
default theme. The basic user writes a one-line pyssg.config.py and never has
to know which plugins exist or how they must be ordered::
from pyssg.presets import docs
config = docs(site={"title": "My Docs"}, base_url="https://example.com")
The preset only declares facts (the plugin list and the theme); the engine
still owns every algorithm. Advanced users can build a :class:Config by hand
instead, or pass extra_plugins to append their own without losing the
defaults.
docs(*, site: dict[str, object] | None = None, base_url: str = '', content_dir: str = 'content', output_dir: str = 'dist', layout: str | Path | None = None, highlight_style: str = 'default', rss_title: str | None = None, extra_plugins: Iterable[Plugin] | None = None) -> Config
Build a :class:Config for a documentation site.
layout defaults to the built-in docs theme; pass a path to override
it with a site-local layout. extra_plugins are appended after the
defaults (so they run last). rss_title defaults to the site title.