Classes
ThemeIntegrationMixin
Mixin providing theme integration methods.
Requires these attributes on the host class:
- root…
ThemeIntegrationMixin
Mixin providing theme integration methods.
Requires these attributes on the host class:
- root_path: Path
- theme: str | None
Attributes
| Name | Type | Description |
|---|---|---|
root_path |
Path |
|
theme |
str | None |
Internal Methods 2
_get_theme_assets_dir
Get the assets directory for the current theme.
Searches for theme assets in o…
_get_theme_assets_dir
def _get_theme_assets_dir(self) -> Path | None
Get the assets directory for the current theme.
Searches for theme assets in order:
- Site's themes directory (site/themes/{theme}/assets)
- Bengal's bundled themes (bengal/themes/{theme}/assets)
Returns
Path to theme assets directory, or None if theme not found or
assets directory doesn't existPath | None
—
_get_theme_assets_chain
Return list of theme asset directories from inheritance chain.
Returns asset d…
_get_theme_assets_chain
def _get_theme_assets_chain(self) -> list[Path]
Return list of theme asset directories from inheritance chain.
Returns asset directories in order from parent themes to child theme (low → high priority). Site assets override all theme assets.
Returns
List of Path objects for theme asset directories, ordered from
parent (low priority) to child (high priority). Empty list if
no theme assets found. Priority Order (lowest to highest):
1. Default theme assets (if extended)
2. Parent theme assets (if extended)
3. Child theme assets
4. Site assets (highest priority, handled separately)list[Path]
—