mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Update items link with slugify function
This commit is contained in:
@@ -2,6 +2,7 @@ import { SITE } from "src/config";
|
||||
import rss from "@astrojs/rss";
|
||||
import type { Frontmatter } from "src/types";
|
||||
import type { MarkdownInstance } from "astro";
|
||||
import slugify from "@utils/slugify";
|
||||
|
||||
const postImportResult = import.meta.glob<MarkdownInstance<Frontmatter>>(
|
||||
"../contents/*.md",
|
||||
@@ -17,7 +18,7 @@ export const get = () =>
|
||||
description: SITE.desc,
|
||||
site: SITE.website,
|
||||
items: posts.map(({ frontmatter }) => ({
|
||||
link: frontmatter.slug,
|
||||
link: slugify(frontmatter),
|
||||
title: frontmatter.title,
|
||||
description: frontmatter.description,
|
||||
pubDate: new Date(frontmatter.datetime),
|
||||
|
||||
Reference in New Issue
Block a user