Module

templates

Built-in templates and template environment factory.

Functions

get_env 3 Any
Create a kida Environment with the built-in template loader. **Returns a kida …
def get_env(*, theme: dict | None = None, enable_capture: bool = False, **kwargs: Any) -> Any

Create a kida Environment with the built-in template loader.

Returns a kida Environment with a chained loader: user templates -> milo built-in templates -> kida components.

Parameters
Name Type Description
theme dict | None

Optional dict of{name: ThemeStyle} overrides. When autoescape is "terminal" (the default), a style filter and themeglobal are registered automatically. Pass a custom dict to override the default palette.

Default:None
enable_capture bool

Forward to kida asenable_capture. When True, renders made under :func:kida.captured_render populate a :class:~kida.RenderCapture exposing per-block output, content keys, and changed-from data — the building blocks for :class:~kida.FreezeCache / :class:~kida.RenderManifest static site flows. Off by default to keep compile cost identical to kida's own default. **kwargs: Forwarded to kida.Environment.

Default:False
**kwargs Any
Returns
Any