fix: missing base path in rss (#551)
* fix missing base path in rss * sort imports
This commit is contained in:
parent
7d5f18d8a1
commit
ef255e6b63
1 changed files with 2 additions and 1 deletions
|
|
@ -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"]),
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue