Module

rendering.adapters.generic

Generic adapter for unknown template engines.

Provides a fallback for engines that don't have specific adapters. Functions are registered with sensible defaults (no page context).

For full context support, engine authors should create a custom adapter following the pattern in jinja.py or kida.py.

Functions

register_context_functions 2 None
Register context-dependent template functions for unknown engines. These funct…
def register_context_functions(env: Any, site: SiteLike) -> None

Register context-dependent template functions for unknown engines.

These functions use site defaults since we can't access page context. For full context support, create a custom adapter for your engine.

Parameters
Name Type Description
env Any

Template environment instance

site SiteLike

Site instance