Module

rendering.template_functions.theme

Theme-related template functions and filters.

Provides filters and functions for accessing theme configuration in templates.

Functions

feature_enabled
Check if a theme feature is enabled.
2 bool
def feature_enabled(feature: str, theme_config: Any) -> bool

Check if a theme feature is enabled.

Parameters 2

Name Type Default Description
feature str

Feature key in dotted notation (e.g., "navigation.toc")

theme_config Any

Theme configuration object (from site.theme_config)

Returns

bool

True if feature is enabled

register
Register theme-related template functions and filters.
2 None
def register(env: Environment, site: Site) -> None

Register theme-related template functions and filters.

Parameters 2

Name Type Default Description
env Environment

Jinja2 environment

site Site

Site instance