Skip to main content

Module template

Module template 

Source
Expand description

The bundled generic partials, plus locating/validating an operator’s template directory.

Partials are required, operator-owned files. init materialises the bundled defaults below; export checks that the required set is present before rendering and otherwise fails with a pointer to wisp init.

Constants§

DEFAULT_DIR
Default template directory, relative to the registry root.
LOGO_SVG
The bundled default logo (the secunit shield).
TYPST_PARTIALS
The bundled generic Typst partials, embedded into the binary.

Functions§

bundled
The bundled partials for a format. HTML partials are not bundled yet (the HTML backends are opt-in / not wired), so requesting them is an error.
detect_format
Detect which partial format a template directory holds, by probing for the format-defining theme file.
missing_partials
Confirm every required partial for format exists in dir. Returns the list of missing filenames (empty == complete).
require_complete
Fail with an actionable error if the template directory is absent or incomplete. This is the gate that makes the partials required.
resolve_dir
Resolve the template directory: explicit override, else <root>/templates/wisp.