Skip to content

Commit 72df077

Browse files
committed
update index (3->5) & change rss author name
1 parent c6763f6 commit 72df077

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ pnpm-debug.log*
2727
.obsidian/
2828

2929
# until i finish
30+
yap-kitchen.md
3031
ics-schedule-generator.md

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ allPosts.sort(
5858
</div>
5959
<hr class="custom-hr" />
6060
<p>
61-
Here are the three latest articles I've published. You can find the
61+
Here are the five latest articles I've published. You can find the
6262
entire list of my writing <a href="/blog" style="font-size: 1em;"
6363
>on the blog page</a
6464
>.
6565
</p>
6666
<ul class="blog-list">
6767
{
68-
allPosts.slice(0, 3).map((post) => (
68+
allPosts.slice(0, 5).map((post) => (
6969
<a href={post.url} class="blog-post-link">
7070
<li class="blog-post-item">
7171
{post.frontmatter.bestof && (

src/pages/rss.xml.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
22

33
export async function GET(context) {
4+
const originalItems = await pagesGlobToRssItems(
5+
import.meta.glob('./blog/*.{md,mdx}')
6+
);
7+
8+
const itemsWithAuthor = originalItems.map((item) => ({
9+
...item,
10+
author: 'Andrew Moses',
11+
}));
12+
413
return rss({
514
title: 'Andrew Moses',
6-
description: 'The personal website & blog of Andrew Moses, a Computer Science student at the University of Wisconsin-Madison.',
15+
description:
16+
'The personal website & blog of Andrew Moses, a Computer Science student at the University of Wisconsin-Madison.',
717
site: context.site,
8-
items: await pagesGlobToRssItems(
9-
import.meta.glob('./blog/*.{md,mdx}'),
10-
),
18+
items: itemsWithAuthor,
1119
stylesheet: '/rss/styles.xsl',
1220
});
1321
}

0 commit comments

Comments
 (0)