added date to rss feed
This commit is contained in:
parent
493ff30b98
commit
9cb67b692c
2 changed files with 19 additions and 9 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
layout: ../../layouts/BlogPostLayout.astro
|
layout: ../../layouts/BlogPostLayout.astro
|
||||||
title: 'Under Construction'
|
title: Under Construction
|
||||||
subtitle: "Wir befinden uns im Aufbau"
|
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!"
|
description: Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet!
|
||||||
image:
|
image:
|
||||||
path: "construction.png"
|
path: construction.png
|
||||||
alt: "Under Construction"
|
alt: Under Construction
|
||||||
author: 'Tim'
|
author: Tim
|
||||||
date: '10.07.2026'
|
date: '2026-07-10'
|
||||||
---
|
---
|
||||||
|
|
||||||
# All Endings Are Beginnings
|
# All Endings Are Beginnings
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,21 @@
|
||||||
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
|
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
|
||||||
|
|
||||||
export async function GET(context) {
|
export async function GET(context) {
|
||||||
|
|
||||||
|
const posts = Object.values(
|
||||||
|
import.meta.glob("./posts/*.md", { eager: true })
|
||||||
|
);
|
||||||
|
|
||||||
return rss({
|
return rss({
|
||||||
title: 'Blauwasser Mausis | Blog',
|
title: 'Blauwasser Mausis | Blog',
|
||||||
description: 'Segel, Fahrrad, Abenteuer',
|
description: 'Segeln, Fahrrad, Abenteuer',
|
||||||
site: context.site,
|
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: `<language>de-de</language>`,
|
customData: `<language>de-de</language>`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue