Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/PostPreview.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Props {
const { post } = Astro.props

const { remarkPluginFrontmatter } = await render(post)
const description = remarkPluginFrontmatter.description || post.data.description
const description = remarkPluginFrontmatter.description
let tags: Collation<'posts'>[] | undefined
if (post.data.tags && post.data.tags.length > 0) {
const tagsGroup = await TagsGroup.build()
Expand Down
5 changes: 3 additions & 2 deletions src/pages/posts/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const getStaticPaths = (async () => {

const { post, prev, next } = Astro.props
const postData = post.data
const { headings, Content: PostContent } = await render(post)
const { headings, Content: PostContent, remarkPluginFrontmatter } = await render(post)
const description = remarkPluginFrontmatter.description
const addendum = await getCollection('addendum')
let AddendumContent
let addendumAvatarImage
Expand Down Expand Up @@ -68,7 +69,7 @@ if (postData.tags && postData.tags.length > 0) {

<Layout
title={postData.title}
description={postData.description}
description={description}
author={postData.author}
tags={postData.tags}
>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export async function GET(_context: AstroGlobal) {
items: posts.map((post) => ({
title: post.data.title,
pubDate: post.data.published,
// TODO this is not consistent with the `remarkDescription` plugin
// should we render the post here as well?
description: post.data.description,
author: post.data.author || siteConfig.author,
link: `/posts/${post.id}`,
Expand Down