Update something

This commit is contained in:
tiff 2025-03-28 02:34:52 -04:00
parent 90f5502efa
commit 5f054f9e10
7 changed files with 4544 additions and 11 deletions

View file

@ -2,8 +2,6 @@ import rss from "@astrojs/rss";
import { getCollection } from "astro:content";
import getSortedPosts from "@/utils/getSortedPosts";
import { SITE } from "@/config";
import { globalImageUrls } from "@/utils/globalImageUrls";
import sanitizeHtml from "sanitize-html";
export async function GET() {
const posts = await getCollection("blog");
@ -12,13 +10,7 @@ export async function GET() {
title: SITE.title,
description: SITE.desc,
site: SITE.website,
items: sortedPosts.map(({ data, id, rendered }) => ({
content: globalImageUrls(
SITE.website,
sanitizeHtml(rendered?.html, {
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
}),
),
items: sortedPosts.map(({ data, id }) => ({
link: `posts/${id}/`,
title: data.title,
description: data.description,