Module

rendering.template_engine.manifest

Asset manifest handling for template engine.

Provides manifest loading and caching for fingerprinted asset resolution.

Related Modules:

  • bengal.rendering.template_engine.core: Uses these helpers
  • bengal.assets.manifest: AssetManifest data model

Classes

ManifestHelpersMixin
Mixin providing asset manifest helper methods for TemplateEngine. Requires these attributes on the…
3

Mixin providing asset manifest helper methods for TemplateEngine.

Requires these attributes on the host class:

  • site: Site instance
  • _asset_manifest_path: Path
  • _asset_manifest_mtime: float | None
  • _asset_manifest_cache: dict[str, AssetManifestEntry]
  • _asset_manifest_fallbacks: set[str]

Attributes

Name Type Description
site Any
_asset_manifest_path Path
_asset_manifest_mtime float | None
_asset_manifest_cache dict[str, AssetManifestEntry]
_asset_manifest_fallbacks set[str]
Internal Methods 3
_get_manifest_entry
Return manifest entry for logical path if the manifest is present.
1 AssetManifestEntry | None
def _get_manifest_entry(self, logical_path: str) -> AssetManifestEntry | None

Return manifest entry for logical path if the manifest is present.

Parameters 1
logical_path str

Logical asset path (e.g., 'css/style.css')

Returns

AssetManifestEntry | None

AssetManifestEntry if found, None otherwise

_load_asset_manifest
Load and cache the asset manifest based on file mtime.
0 dict[str, AssetMani…
def _load_asset_manifest(self) -> dict[str, AssetManifestEntry]

Load and cache the asset manifest based on file mtime.

Returns

dict[str, AssetManifestEntry]

Dictionary of asset path to manifest entry

_warn_manifest_fallback
Warn once per logical path when manifest lookup misses and fallback is used.
1 None
def _warn_manifest_fallback(self, logical_path: str) -> None

Warn once per logical path when manifest lookup misses and fallback is used.

Parameters 1
logical_path str

Asset path that was not found in manifest