pyssg is pre-1.0 and under active development - APIs, config, and themes may change.
pyssg.plugins.render

1 min read

pyssg.plugins.render

Render plugin.

Terminal render step: takes a generated Page, builds the template context {page, site, collections, content_html, ...} and renders it via the layout's Jinja2 templates. The context is enriched with site-wide derived data (nav menu, breadcrumbs, prev/next, backlinks, tags, toc) read from the graph and build.site_data so templates stay simple.

The render is cache-backed: the cache key is a digest of every context input (with the large content_html folded in by hash), so an unchanged page is a cache hit during the per-build render sweep.

Third-party (Jinja2) is confined to this peripheral plugin.

class RenderPlugin

Renders pages through the layout's Jinja2 templates.

RenderPlugin.apply(self, builder: Builder) -> None

render() -> RenderPlugin

Factory used in pyssg.config.py.