fix: guard _meta.html against missing post variable

Calendar templates extend post/index.html but don't provide a
post context variable. Wrap post-specific meta in an if guard
so pages without post still get basic meta from meta_base.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 01:43:25 +00:00
parent 668d9c7df8
commit fda91bbea6

View File

@@ -2,6 +2,9 @@
{# Context expected:
site, post, request
#}
{% if post is not defined %}
{% include 'social/meta_base.html' %}
{% else %}
{# Visibility → robots #}
{% set is_public = (post.visibility == 'public') %}
@@ -122,3 +125,4 @@
<script type="application/ld+json">
{{ jsonld | tojson }}
</script>
{% endif %}