Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 89 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"stylelint:fix": "stylelint --fix '**/*.{astro,css}' -f verbose"
},
"dependencies": {
"@astrojs/rss": "^4.0.18",
"@astrojs/starlight": "^0.38.2",
"astro": "^6.1.2",
"mermaid": "^11.14.0",
Expand Down
19 changes: 19 additions & 0 deletions src/pages/blog-feed.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import rss from '@astrojs/rss'
import { getCollection } from 'astro:content'

export async function GET(context) {
const blog = await getCollection('blog')
return rss({
title: 'Blog',
description: 'Technical updates from ArchivesSpace developers',
site: context.site,
items: blog.map((post) => ({
title: post.data.title,
pubDate: post.data.pubDate,
description: post.data.metaDescription,
// Compute RSS link from post `id`
// This example assumes all posts are rendered as `/blog/[id]` routes
link: `/blog/${post.id}/`
}))
})
}
18 changes: 18 additions & 0 deletions src/pages/docs-feed.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import rss from '@astrojs/rss'
import { getCollection } from 'astro:content'

export async function GET(context) {
const blog = await getCollection('docs')
return rss({
title: 'TechDocs',
description: 'Technical documentation from ArchivesSpace developers',
site: context.site,
items: blog.map((post) => ({
title: post.data.title,
description: post.data.description,
// Compute RSS link from post `id`
// This example assumes all posts are rendered as `/[id]` routes
link: `/${post.id}/`
}))
})
}