initial: Astro port of Hype404 with favicon + SEO redirects

This commit is contained in:
2026-04-20 04:52:49 +00:00
commit 8dc5b450a8
542 changed files with 8168 additions and 0 deletions

18
src/pages/rss.xml.js Normal file
View File

@@ -0,0 +1,18 @@
import rss from '@astrojs/rss';
import { site } from '../lib/site.js';
import { getAllPosts, renderMarkdown, getExcerpt } from '../lib/markdown.js';
export function GET(context) {
const posts = getAllPosts().slice(0, 20);
return rss({
title: site.name,
description: site.description,
site: context.site ?? site.url,
items: posts.map((post) => ({
title: post.title,
pubDate: new Date(post.date),
description: getExcerpt(post.body, 300),
link: `/${post.slug}/`,
})),
});
}