From e8c15931d8bd7fbf21a81f5c1fef0b6e557e68ef Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Sun, 25 Sep 2022 19:26:02 +0630 Subject: [PATCH] Update items link with slugify function --- src/pages/rss.xml.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 3c7bd21..d6c3aed 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -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>( "../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),