From 9cb67b692ca1c1dcc6a13c2859b88eeadadb211b Mon Sep 17 00:00:00 2001 From: ebby Date: Tue, 28 Jul 2026 15:27:17 +0200 Subject: [PATCH] added date to rss feed --- blog/src/pages/posts/100726_Under_Construction.md | 14 +++++++------- blog/src/pages/rss.xml.js | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/blog/src/pages/posts/100726_Under_Construction.md b/blog/src/pages/posts/100726_Under_Construction.md index 3a17843..1826de2 100644 --- a/blog/src/pages/posts/100726_Under_Construction.md +++ b/blog/src/pages/posts/100726_Under_Construction.md @@ -1,13 +1,13 @@ --- layout: ../../layouts/BlogPostLayout.astro -title: 'Under Construction' -subtitle: "Wir befinden uns im Aufbau" -description: "Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet!" +title: Under Construction +subtitle: Wir befinden uns im Aufbau +description: Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet! image: - path: "construction.png" - alt: "Under Construction" -author: 'Tim' -date: '10.07.2026' + path: construction.png + alt: Under Construction +author: Tim +date: '2026-07-10' --- # All Endings Are Beginnings diff --git a/blog/src/pages/rss.xml.js b/blog/src/pages/rss.xml.js index 3923234..5b6b823 100644 --- a/blog/src/pages/rss.xml.js +++ b/blog/src/pages/rss.xml.js @@ -1,11 +1,21 @@ import rss, { pagesGlobToRssItems } from '@astrojs/rss'; export async function GET(context) { + + const posts = Object.values( + import.meta.glob("./posts/*.md", { eager: true }) + ); + return rss({ title: 'Blauwasser Mausis | Blog', - description: 'Segel, Fahrrad, Abenteuer', + description: 'Segeln, Fahrrad, Abenteuer', site: context.site, - items: await pagesGlobToRssItems(import.meta.glob('./**/*.md')), + items: posts.map(post => ({ + title: post.frontmatter.title, + pubDate: Date.parse(post.frontmatter.date), + description: post.frontmatter.description, + link: post.url, + })), customData: `de-de`, }); } \ No newline at end of file