{# ============================================================================= posts.html — Blog Listing Layout (Plural Template) ============================================================================= This template is resolved by Moosey's Waterfall for section index pages (e.g., /posts). It provides: • Section title and description from frontmatter • Main content area rendering posts/index.md body • Sidebar with sibling navigation (nav_items) — sorted by frontmatter Waterfall Resolution (for /posts): 1. Frontmatter override → (not set) 2. Exact match → (path is "posts", is_index=True, so skip) 3. Singular parent → templates/post.html (single item layout) 4. Plural parent → templates/posts.html (USED! section listing) 5. Fallback → templates/page.html Why posts.html exists: Without this file, /posts would render with post.html (singular), which is designed for individual articles. posts.html provides a listing/index layout optimised for showing multiple entries. Template Variables: {{ title }} – from posts/index.md frontmatter {{ description }} – from frontmatter {{ content }} – rendered Markdown from posts/index.md body {{ nav_items }} – sibling pages (individual blog posts, sorted) {{ breadcrumbs }} – breadcrumb trail {{ slug }} – URL slug ("posts") nav_items in this context: Each item represents a blog post (e.g., building-modern-apps.md): .name – post title from frontmatter .url – /posts/building-modern-apps .is_active – True if this is the current page .metadata – full frontmatter dict .tags – ["fastapi", "python", ...] .date – frontmatter date .image – featured image URL .description – post excerpt Extends: layout/base.html ============================================================================= #} {% extends "layout/base.html" %} {% block content %}
{{ description }}
{{ item.metadata.description }}