mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
fix: fix broken post links and hide draft posts in rss feed
This commit is contained in:
@@ -17,8 +17,10 @@ export const get = () =>
|
|||||||
title: SITE.title,
|
title: SITE.title,
|
||||||
description: SITE.desc,
|
description: SITE.desc,
|
||||||
site: SITE.website,
|
site: SITE.website,
|
||||||
items: posts.map(({ frontmatter }) => ({
|
items: posts
|
||||||
link: slugify(frontmatter),
|
.filter(({ frontmatter }) => !frontmatter.draft)
|
||||||
|
.map(({ frontmatter }) => ({
|
||||||
|
link: `posts/${slugify(frontmatter)}`,
|
||||||
title: frontmatter.title,
|
title: frontmatter.title,
|
||||||
description: frontmatter.description,
|
description: frontmatter.description,
|
||||||
pubDate: new Date(frontmatter.datetime),
|
pubDate: new Date(frontmatter.datetime),
|
||||||
|
|||||||
Reference in New Issue
Block a user