mirror of
https://github.com/prdlk/website.git
synced 2026-08-02 17:31:41 +00:00
init(): Initialize project with basic configuration files
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { getCollection } from "astro:content";
|
||||
import rss from "@astrojs/rss";
|
||||
import { siteConfig } from "@/site.config";
|
||||
|
||||
export const GET = async () => {
|
||||
const notes = await getCollection("note");
|
||||
|
||||
return rss({
|
||||
title: siteConfig.title,
|
||||
description: siteConfig.description,
|
||||
site: import.meta.env.SITE,
|
||||
items: notes.map((note) => ({
|
||||
title: note.data.title,
|
||||
pubDate: note.data.publishDate,
|
||||
link: `notes/${note.id}/`,
|
||||
})),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user