From 36288befe10b384d3f922f94af610095fd1afed6 Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Fri, 24 Apr 2026 08:30:50 +0200 Subject: [PATCH] fix(post): render post.headline/subheadline when markdown body has no H1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The article template only rendered the H1 it could pluck from the markdown body (`contentHeadlineHtml`). Posts whose body opens with H2 (or no heading) silently lost both the schema-level `headline` and `subheadline` — they were used in SEO/JSON-LD/breadcrumb only. Fall back to the structured fields when no inline H1 is present. --- src/routes/post/[slug]/+page.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/routes/post/[slug]/+page.svelte b/src/routes/post/[slug]/+page.svelte index a86426e..725a9db 100644 --- a/src/routes/post/[slug]/+page.svelte +++ b/src/routes/post/[slug]/+page.svelte @@ -77,6 +77,15 @@
{@html data.contentHeadlineHtml}
+ {:else if data.post.headline || data.post.subheadline} +
+ {#if data.post.headline} +

{data.post.headline}

+ {/if} + {#if data.post.subheadline} +

{data.post.subheadline}

+ {/if} +
{/if} {#if data.isEvent && (data.eventDateLabel || data.eventLocationText)}