You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
701 B
24 lines
701 B
import rss from "@astrojs/rss";
|
|
import { getCollection } from "astro:content";
|
|
|
|
export async function get(context) {
|
|
const posts = (await getCollection("blog"))
|
|
.filter(
|
|
(entry) => !entry.data.wip || process.env.NODE_ENV === "development"
|
|
)
|
|
.map((post) => ({
|
|
title: post.data.title,
|
|
pubDate: post.data.pubDate,
|
|
description: post.data.description,
|
|
link: `/blog/${post.slug}/`,
|
|
}));
|
|
|
|
return rss({
|
|
title: "Ruthenic's blog",
|
|
description: "My blog, utilized for talking about random things.",
|
|
site: context.site,
|
|
items: posts,
|
|
stylesheet: "/rssStyle.xsl",
|
|
});
|
|
}
|