Functions
resolve_theme_chain
Resolve theme inheritance chain starting from the active theme.
Order: child first → parent → ... …
resolve_theme_chain
def resolve_theme_chain(active_theme: str | None, site: Any) -> list[str]
Resolve theme inheritance chain starting from the active theme.
Order: child first → parent → ... (do not duplicate 'default').
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
active_theme |
str | None |
— | Active theme name |
site |
Any |
— | Site instance |
Returns
List of theme names in inheritance orderlist[str]
—
read_theme_extends
Read theme.toml for 'extends' from site, installed, or bundled theme path.
read_theme_extends
def read_theme_extends(theme_name: str, site: Any) -> str | None
Read theme.toml for 'extends' from site, installed, or bundled theme path.
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
theme_name |
str |
— | Theme name to look up |
site |
Any |
— | Site instance |
Returns
Parent theme name if extends is set, None otherwisestr | None
—
create_jinja_environment
Create and configure Jinja2 environment.
create_jinja_environment
def create_jinja_environment(site: Any, template_engine: Any, profile_templates: bool = False) -> tuple[Environment, list[Path]]
Create and configure Jinja2 environment.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
site |
Any |
— | Site instance |
template_engine |
Any |
— | TemplateEngine instance (for function bindings) |
profile_templates |
bool |
False |
Whether template profiling is enabled |
Returns
Tuple of (Jinja2 Environment, list of template directories)tuple[Environment, list[Path]]
—