fix: missing base path in rss (#551)
* fix missing base path in rss * sort imports
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import rss from "@astrojs/rss";
|
import rss from "@astrojs/rss";
|
||||||
import { getSortedPosts } from "@utils/content-utils";
|
import { getSortedPosts } from "@utils/content-utils";
|
||||||
|
import { url } from "@utils/url-utils";
|
||||||
import type { APIContext } from "astro";
|
import type { APIContext } from "astro";
|
||||||
import MarkdownIt from "markdown-it";
|
import MarkdownIt from "markdown-it";
|
||||||
import sanitizeHtml from "sanitize-html";
|
import sanitizeHtml from "sanitize-html";
|
||||||
@@ -30,7 +31,7 @@ export async function GET(context: APIContext) {
|
|||||||
title: post.data.title,
|
title: post.data.title,
|
||||||
pubDate: post.data.published,
|
pubDate: post.data.published,
|
||||||
description: post.data.description || "",
|
description: post.data.description || "",
|
||||||
link: `/posts/${post.slug}/`,
|
link: url(`/posts/${post.slug}/`),
|
||||||
content: sanitizeHtml(parser.render(cleanedContent), {
|
content: sanitizeHtml(parser.render(cleanedContent), {
|
||||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user