{# ============================================================================= advanced/templates/layout/base.html — Advanced Demo Base Layout ============================================================================= Extended version of the base layout for the advanced demo. Adds support for: - Page-level styles/scripts arrays from frontmatter - Route-conditional assets - site_data.cta for the nav button ============================================================================= #} {{ seo() }} {# PATTERN: Page-Level Styles Frontmatter can include a "styles" array. Each entry is a URL that gets injected into the as a tag. See advanced/content/pages/process.md for an example. #} {% for href in styles | default([]) %} {% endfor %} {# PATTERN: Route-Conditional Assets Sometimes only one section needs a script. Check request.path to conditionally include assets without adding them globally. #} {% set current_path = request.path.rstrip('/') or '/' %} {% if current_path == '/page-builder-demo' %} {% endif %}
{% block content %}{% endblock %}
{# PATTERN: Page-Level Scripts Frontmatter can include a "scripts" array. Each entry is a URL injected just before . #} {% for src in scripts | default([]) %} {% endfor %}