Commit fc25583836

fc25583836ac3f62300328807b53257c13be01a0

parent: a16d9f5622

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-12 05:12 UTC

fix build: derive parent section from page.ancestors

page templates never receive a `section` variable, and tera raises on
the undefined name before `default()` can apply, so every page failed
to render. use get_section on the last ancestor instead. privacy pages
now link back to /privacy/ rather than the homepage.

Layout: unified · split

templates/page.html +2 −1
@@ -4,7 +4,8 @@
4{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} 4{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %}
5 5
6{% block content %} 6{% block content %}
7<p class="back"><a href="{{ section.permalink | default(value=get_url(path="/")) | safe }}">&larr; back</a></p> 7{% set parent = get_section(path=page.ancestors | last, metadata_only=true) %}
8<p class="back"><a href="{{ parent.permalink | safe }}">&larr; back</a></p>
8<article class="prose"> 9<article class="prose">
9 <h1 class="page-label">{{ page.title }}</h1> 10 <h1 class="page-label">{{ page.title }}</h1>
10 {% if page.description %}<p class="lede">{{ page.description }}</p>{% endif %} 11 {% if page.description %}<p class="lede">{{ page.description }}</p>{% endif %}