Compare commits

...

2 Commits

Author SHA1 Message Date
giles
66edfca7dc fix: use events_url() for calendar links in post nav
Calendar routes moved to events service, so blog can no
longer use url_for('blog.post.calendars...').

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:35:05 +00:00
giles
fda91bbea6 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>
2026-02-10 01:43:25 +00:00
2 changed files with 6 additions and 3 deletions

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 %}

View File

@@ -29,11 +29,10 @@
{# Calendars #}
{% for calendar in calendars %}
{% set local_href=url_for('blog.post.calendars.calendar.get', slug=post.slug, calendar_slug=calendar.slug) %}
{% set href=local_href|host %}
{% set local_href=events_url('/calendars/' + calendar.slug + '/') %}
<a
href="{{ local_href }}"
hx-get="{{ href }}"
hx-get="{{ local_href }}"
hx-target="#main-panel"
hx-select="{{ hx_select_search }}"
hx-swap="outerHTML"