From 71dd87865126f82e9651ef2eedad9cd312a7ca61 Mon Sep 17 00:00:00 2001 From: polsevev Date: Thu, 8 Aug 2024 20:16:20 +0200 Subject: [PATCH] Added homelab blog to rss --- astro.config.mjs | 2 +- src/pages/rss.xml.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 3b2f75c..ead3ef3 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,6 +5,6 @@ import sitemap from '@astrojs/sitemap'; // https://astro.build/config export default defineConfig({ - site: 'https://example.com', + site: 'https://polsevev.dev', integrations: [mdx(), sitemap()], }); diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 9ff9801..0ac150f 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -4,6 +4,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; export async function GET(context) { const posts = await getCollection('blog'); + const homelab = await getCollection('homelab'); return rss({ title: SITE_TITLE, description: SITE_DESCRIPTION, @@ -11,6 +12,9 @@ export async function GET(context) { items: posts.map((post) => ({ ...post.data, link: `/blog/${post.slug}/`, - })), + })).concat(homelab.map((post) => ({ + ...post.data, + link: `/homelab/${post.slug}` + }))), }); }