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

1 min read

pyssg.plugins.transclude

Transclusion plugin: Obsidian-style

missing: ...
embeds.

Embeds one document's finalized content into another. Runs in expand_content (after wikilink/link resolution), expanding recursively with cycle detection (A embeds B embeds A is rejected). Embedding is a deterministic function of the final graph, so incremental output stays identical to a full build; a host re-renders when an embedded document changes because the render sweep recomputes its content each finalize.

v1 embeds whole notes; section/block-granular embeds (#heading / #^id) fall back to the whole note.

expand_transclusions(build: Build) -> None

expand_content tap: replace

missing: ...
with embedded content.

class TranscludePlugin

Obsidian-style

missing: ...
transclusion.

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

transclude() -> TranscludePlugin

Factory used in pyssg.config.py.