-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update index (3->5) & change rss author name
- Loading branch information
Showing
3 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,5 @@ pnpm-debug.log* | |
.obsidian/ | ||
|
||
# until i finish | ||
yap-kitchen.md | ||
ics-schedule-generator.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
import rss, { pagesGlobToRssItems } from '@astrojs/rss'; | ||
|
||
export async function GET(context) { | ||
const originalItems = await pagesGlobToRssItems( | ||
import.meta.glob('./blog/*.{md,mdx}') | ||
); | ||
|
||
const itemsWithAuthor = originalItems.map((item) => ({ | ||
...item, | ||
author: 'Andrew Moses', | ||
})); | ||
|
||
return rss({ | ||
title: 'Andrew Moses', | ||
description: 'The personal website & blog of Andrew Moses, a Computer Science student at the University of Wisconsin-Madison.', | ||
description: | ||
'The personal website & blog of Andrew Moses, a Computer Science student at the University of Wisconsin-Madison.', | ||
site: context.site, | ||
items: await pagesGlobToRssItems( | ||
import.meta.glob('./blog/*.{md,mdx}'), | ||
), | ||
items: itemsWithAuthor, | ||
stylesheet: '/rss/styles.xsl', | ||
}); | ||
} |