Added homelab blog to rss
This commit is contained in:
parent
429e7ff3b0
commit
71dd878651
2 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,6 @@ import sitemap from '@astrojs/sitemap';
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://example.com',
|
site: 'https://polsevev.dev',
|
||||||
integrations: [mdx(), sitemap()],
|
integrations: [mdx(), sitemap()],
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
||||||
|
|
||||||
export async function GET(context) {
|
export async function GET(context) {
|
||||||
const posts = await getCollection('blog');
|
const posts = await getCollection('blog');
|
||||||
|
const homelab = await getCollection('homelab');
|
||||||
return rss({
|
return rss({
|
||||||
title: SITE_TITLE,
|
title: SITE_TITLE,
|
||||||
description: SITE_DESCRIPTION,
|
description: SITE_DESCRIPTION,
|
||||||
|
@ -11,6 +12,9 @@ export async function GET(context) {
|
||||||
items: posts.map((post) => ({
|
items: posts.map((post) => ({
|
||||||
...post.data,
|
...post.data,
|
||||||
link: `/blog/${post.slug}/`,
|
link: `/blog/${post.slug}/`,
|
||||||
})),
|
})).concat(homelab.map((post) => ({
|
||||||
|
...post.data,
|
||||||
|
link: `/homelab/${post.slug}`
|
||||||
|
}))),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue