{# ============================================================================= post.html — Single Blog Post Layout (Singular Template) ============================================================================= This template is resolved by Moosey's Waterfall for individual blog posts (e.g., /posts/building-modern-apps). It provides a rich article layout with: • Full-width header with featured image overlay • Author avatar, publish date, and reading time • Article body with prose typography • Tags list from frontmatter • Breadcrumb navigation Waterfall Resolution (for /posts/building-modern-apps): 1. Frontmatter override → (not set) 2. Exact match → templates/posts/building-modern-apps.html (DNE) 3. Singular parent → templates/post.html (USED! "posts" -> "post") 4. Plural parent → templates/posts.html (listing layout) 5. Fallback → templates/page.html Template Variables: {{ title }} – from frontmatter or URL-derived {{ description }} – from frontmatter {{ content }} – Markdown body rendered to HTML {{ date }} – dict with {created: datetime, updated: datetime} {{ tags }} – list from frontmatter "tags" key {{ image }} – featured image URL from frontmatter "image" key {{ breadcrumbs }} – breadcrumb trail list {{ site_data }} – global site data dict {{ slug }} – URL-friendly slug of the page filename Filters Demonstrated: {{ date.created | fancy_date }} – "13th Jan, 2026 at 6:00 PM" {{ content | read_time }} – "5 min read" Extends: layout/base.html ============================================================================= #} {% extends "layout/base.html" %} {% block content %}
{# ================================================================ POST HEADER ================================================================ A dark header with: - Optional featured image as a dimmed background - Breadcrumbs centered above the title - Post title - Author avatar initial, author name, publish date, read time #}
{# If the Markdown frontmatter has an "image" key, use it as a featured background image for the header. The opacity-30 class dims it so text remains readable. #} {% if image %} {{ title }} {% endif %}
{# -- Breadcrumbs -- #} {# breadcrumbs is auto-generated from the URL: /posts/building-modern-apps generates: Home / Posts / Building Modern Apps #}
{% for crumb in breadcrumbs %} {{ crumb.name }} {% if not loop.last %}/{% endif %} {% endfor %}
{# -- Post title -- #}

{{ title }}

{# -- Post metadata (author, date, read time) -- #} {# These demonstrate Moosey's template globals and filters: - site_data.author – from init_cms() site_data - date.created – file creation timestamp - fancy_date – formats datetime with ordinal suffix - read_time – estimates reading time at 200 wpm - content – the rendered Markdown body #}
{# Author avatar initial #}
{{ site_data.author[0] }}
{{ site_data.author }}
{# fancy_date is a Moosey filter that formats dates with ordinal suffixes: "21st Jan, 2026 at 6:00 PM" #} {# read_time calculates reading time at ~200 words per minute. It operates on the raw {{ content }} text. #} {{ content | read_time }}
{# ================================================================ POST BODY ================================================================ The rendered Markdown content with enhanced prose styling. #}
{# prose prose-lg prose-slate: Tailwind typography plugin classes for beautiful article typography. The additional prose-* overrides fine-tune heading fonts, link colours, and image styling. #}
{{ content | safe }}
{# ================================================================ TAGS ================================================================ If the Markdown frontmatter contains a "tags" list, render it below the article body. Example frontmatter in content/posts/building-modern-apps.md: tags: [fastapi, python, architecture] #} {% if tags %}

Filed Under

{% for tag in tags %} #{{ tag }} {% endfor %}
{% endif %}
{% endblock %}