Skip to main content

render_page_assets

Function render_page_assets 

Source
pub fn render_page_assets(
    resolved: &ResolvedComponent,
    data: &Value,
    page_name: &str,
    asset_prefix: &str,
) -> Result<PageAssets, String>
Expand description

Render a resolved .van component with separated assets.

Instead of inlining CSS/JS into the HTML, returns them as separate entries in the assets map, with HTML referencing them via <link> / <script src>.

asset_prefix determines the URL path prefix for assets, e.g. “/themes/van1/assets” → produces “/themes/van1/assets/css/page.css”.