{{ post.title }}
{% if post.metadata.get('description') %}{{ post.metadata.get('description') }}
{% endif %}{% extends "base.html" %} {# Year Archive Template Displays all posts from a specific year, grouped by month. Uses query indexes for O(1) lookups instead of O(n) filtering. URL Pattern: /archive/2024/ Required page metadata: - year: "2024" Optional metadata: - section: "blog" (which section to show archives for) - show_stats: true (show statistics for the year) Usage: Create content/archive/2024.md: --- title: "2024 Archive" year: "2024" template: archive-year.html --- Context variables: - page: Current page with year in metadata - page.metadata.year: The year to show - site.indexes.date_range: Date range index #} {% from 'partials/navigation-components.html' import breadcrumbs %} {% from 'partials/content-components.html' import tag_list %} {% set year = page.metadata.year | string %} {% set section_filter = page.metadata.get('section') %} {% block content %} {{ breadcrumbs(page) }}
{{ year_posts | length }} post{{ 's' if year_posts | length != 1 }} in {{ year }}
{# Optional statistics #} {% if page.metadata.get('show_stats') %}{{ post.metadata.get('description') }}
{% endif %}