{frontmatter.title}
Written by {frontmatter.author}
Published on {frontmatter.pubDate.toISOString().slice(0,10)}
-Approximately {frontmatter.minutesRead}
+Approximately {remarkPluginFrontmatter.minutesRead}
From c39c215cf293742545478b082a16fc93784545c3 Mon Sep 17 00:00:00 2001 From: bitbloxhub <45184892+bitbloxhub@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:49:42 -0700 Subject: [PATCH] stupid astro content collections not supporting remark plugins well. --- src/components/BlogPost.astro | 5 +++-- src/content/config.ts | 2 +- src/layouts/MarkdownPostLayout.astro | 4 ++-- src/pages/blog.astro | 4 ++-- src/pages/posts/[...slug].astro | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/BlogPost.astro b/src/components/BlogPost.astro index ef75df1..10c2354 100644 --- a/src/components/BlogPost.astro +++ b/src/components/BlogPost.astro @@ -1,8 +1,9 @@ --- -const { title, url, minutesRead, pubDate } = Astro.props +const { title, url, pubDate, renderPromise } = Astro.props +const { remarkPluginFrontmatter } = await renderPromise ---
Written by {frontmatter.author}
Published on {frontmatter.pubDate.toISOString().slice(0,10)}
-Approximately {frontmatter.minutesRead}
+Approximately {remarkPluginFrontmatter.minutesRead}