Skip to content

Commit

Permalink
[example/inline-mod-astro]: Add missing dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Mar 25, 2024
1 parent 73177b2 commit 146c276
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ node_modules/
dist/
build/
.inox-tools/
*.js
*.js.map
1 change: 1 addition & 0 deletions examples/inline-mod-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/node": "^8.2.3",
"@astrojs/rss": "^4.0.5",
"astro": "^4.4.15",
"typescript": "^5.4.2",
"vite": "^5.1.5"
Expand Down
16 changes: 16 additions & 0 deletions examples/inline-mod-astro/src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';

export async function GET(context) {
const posts = await getCollection('blog');
return rss({
title: SITE_TITLE,
description: SITE_DESCRIPTION,
site: context.site,
items: posts.map((post) => ({
...post.data,
link: `/blog/${post.slug}/`,
})),
});
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 146c276

Please sign in to comment.