Functions
feature_enabled
Check if a theme feature is enabled.
feature_enabled
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
True if feature is enabledbool
—
register
Register theme-related template functions and filters.
register
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 |