1 min read
pyssg.core.builder
Long-lived build scope: Builder (Compiler) and its hooks.
The Builder is configured once (plugins apply here) and lives across a whole
watch session, holding the registries and -- from M4 -- the persistent cache.
Each (re)build instantiates a fresh Build that reaches back to this scope.
class BuilderHooks
Hooks scoped to the long-lived builder.
class Builder
The long-lived compiler.
Builder.__init__(self, config: Config | None = None, site_dir: Path | None = None, cache: Cache | None = None) -> None
Builder.use(self, plugin: Plugin) -> None
Apply a plugin once at configuration time.
Builder.create_build(self) -> Build
Start a fresh per-build compilation that reaches back to this scope.