{% extends "base.html" %} {# Generic Section Index Template Used for non-chronological section landing pages. Falls back when no specialized template exists. Context variables: - section: Section object (for auto-generated pages) - page: Page object (for explicit _index.md files) - posts: Child pages (_posts) - subsections: Child sections (_subsections) Frontmatter options (discover: structure): discover: children: title: "Custom Title" # or false to hide variant: "cards" # compact | cards | minimal children: false # disable children entirely related: title: "Custom Title" limit: 5 related: false # disable related entirely #} {% from 'partials/navigation-components.html' import breadcrumbs %} {% from 'partials/components/tiles.html' import content_tiles %} {% block content %} {{ breadcrumbs(page if page else section) }}

{{ page.title if page else section.title if section else site.title }}

{% if page and (params?.description ?? none) %}

{{ params.description }}

{% elif section and (section?.params?.description ?? none) %}

{{ section.params.description }}

{% end %}
{# User-provided content (from _index.md) #} {% if content %}
{{ content | safe }}
{% end %} {# Content tiles with smart defaults - use discover: frontmatter to customize #} {% set discover = params.discover if page else {} %} {% set children_config = discover.children if discover else {} %} {% set related_config = discover.related if discover else {} %} {% set children_disabled = children_config is sameas false %} {% set related_disabled = related_config is sameas false %} {% set show_children = not children_disabled %} {% set show_related = not related_disabled %} {% set children_title = children_config.title ?? 'In This Section' if children_config is mapping else 'In This Section' %} {% set children_variant = children_config.variant ?? 'compact' if children_config is mapping else 'compact' %} {% set related_title = related_config.title ?? 'Related Pages' if related_config is mapping else 'Related Pages' %} {% set related_limit = (related_config.limit ?? 5) | int if related_config is mapping else (related_config | int if related_config is number else 5) %} {% set children_title = none if children_title is sameas false else children_title %} {% set related_title = none if related_title is sameas false else related_title %} {% set has_children = posts or subsections %} {% set has_related = show_related and page and page.related_posts %} {% if show_children and (has_children or has_related) %} {{ content_tiles( title=children_title if has_children else none, children=posts if show_children else none, subsections=subsections if show_children else none, related=page.related_posts[:related_limit] if has_related else none, related_title=related_title, variant=children_variant, group_by='type' if has_children and has_related else none, page=page ) }} {% end %} {# Empty state if no children to display #} {% if not (posts or subsections) %} {# Empty state with helpful guidance #}

This section doesn't have any content yet.

{% if section %}

To add content:

  • Create a page: content/{{ section.path.relative_to(site.content_dir) }}/my-page.md
  • Add a custom index: content/{{ section.path.relative_to(site.content_dir) }}/_index.md
  • Create a subsection: content/{{ section.path.relative_to(site.content_dir) }}/subsection/
{% end %}
{% end %}
{% end %}