From 62f6e33bd46473ad30ce38237d5873cf9e78b3b8 Mon Sep 17 00:00:00 2001 From: Peter Buschenreiter Date: Sun, 5 May 2024 11:28:56 +0200 Subject: [PATCH] fixed view transitions on blog posts not having slug passed to metadata --- src/routes/blog/[slug]/+page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/blog/[slug]/+page.ts b/src/routes/blog/[slug]/+page.ts index 6855189..3d029eb 100644 --- a/src/routes/blog/[slug]/+page.ts +++ b/src/routes/blog/[slug]/+page.ts @@ -9,7 +9,7 @@ export const load: PageLoad = async ({ params }) => { const blogPost = await import(`../../../blog/${slug}.md`); return { content: blogPost.default, - metadata: blogPost.metadata as BlogPost + metadata: { ...blogPost.metadata, slug } satisfies BlogPost }; } catch (e) { error(404, `Could not find ${slug}`);