summaryrefslogtreecommitdiff
path: root/src/pages/rss.xml.ts
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2025-07-22 10:03:40 +0300
committerDawid Rycerz <dawid@rycerz.xyz>2025-07-22 10:03:40 +0300
commit8589a3bc97190c3d3bbb7246ea517e7855abfeed (patch)
tree7c92af8a6a72148973af1e0ec240a15f2386edea /src/pages/rss.xml.ts
parentd571a3720ae42f3cf5fddf2454e04aa2ad775b0c (diff)
cleanup and styling
Diffstat (limited to 'src/pages/rss.xml.ts')
-rw-r--r--src/pages/rss.xml.ts37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts
deleted file mode 100644
index f8831b7..0000000
--- a/src/pages/rss.xml.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { getRssString } from '@astrojs/rss';
-
-import { SITE, METADATA, APP_BLOG } from 'astrowind:config';
-import { fetchPosts } from '~/utils/blog';
-import { getPermalink } from '~/utils/permalinks';
-
-export const GET = async () => {
- if (!APP_BLOG.isEnabled) {
- return new Response(null, {
- status: 404,
- statusText: 'Not found',
- });
- }
-
- const posts = await fetchPosts();
-
- const rss = await getRssString({
- title: `${SITE.name}’s Blog`,
- description: METADATA?.description || '',
- site: import.meta.env.SITE,
-
- items: posts.map((post) => ({
- link: getPermalink(post.permalink, 'post'),
- title: post.title,
- description: post.excerpt,
- pubDate: post.publishDate,
- })),
-
- trailingSlash: SITE.trailingSlash,
- });
-
- return new Response(rss, {
- headers: {
- 'Content-Type': 'application/xml',
- },
- });
-};