Files
claudetools/projects/radio-show/website/src/pages/feed.xml.ts
Mike Swanson a2b8332770 Radio show website: light mode fix, headshot, motto update
- Fix hero title/tagline/description text invisible in light mode
- Replace ghost button with accent-bordered outline button for contrast
- Add [data-theme="light"] overrides for hero gradients
- Add Mike Swanson headshot (WebP 11KB + JPEG fallback) to about page and home
- Replace SVG placeholders with real photo (circular crop on about, framed on home)
- Update show motto across all locations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 18:04:31 -07:00

38 lines
1.4 KiB
TypeScript

import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import type { APIContext } from 'astro';
export async function GET(context: APIContext) {
const episodes = await getCollection('episodes');
const sortedEpisodes = episodes.sort(
(a, b) =>
new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime()
);
return rss({
title: 'The Computer Guru Show',
description:
'Helping you deal with all of your technology needs while treating you like a person in the process.',
site: context.site!.toString(),
items: sortedEpisodes.map((ep) => ({
title: ep.data.title,
pubDate: ep.data.pubDate,
description: ep.body?.substring(0, 300) || ep.data.title,
link: `/episodes/${ep.id}`,
customData: `<enclosure url="${ep.data.audioUrl}" length="${ep.data.audioSize}" type="audio/mpeg"/>
<itunes:duration>${ep.data.duration}</itunes:duration>
<itunes:episode>${ep.data.episode}</itunes:episode>
<itunes:season>${ep.data.season}</itunes:season>`,
})),
customData: `<language>en-us</language>
<itunes:author>Mike Swanson</itunes:author>
<itunes:category text="Technology"/>
<itunes:image href="https://radio.azcomputerguru.com/og-image.jpg"/>
<itunes:explicit>false</itunes:explicit>
<itunes:type>episodic</itunes:type>`,
xmlns: {
itunes: 'http://www.itunes.com/dtds/podcast-1.0.dtd',
},
});
}