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