diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 852bc91..e5d783f 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -2,6 +2,7 @@ import rss from '@astrojs/rss'; import sanitizeHtml from 'sanitize-html'; import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import { getCollection, render } from 'astro:content'; +import node from 'astro/logger/node'; export async function GET(context) { const notes = (await getCollection('notes')).sort((a, b) => @@ -32,12 +33,13 @@ export async function GET(context) { }), } }) + return { - title: note.data.title, + title: note.data.subtitle ? `${note.data.title} • ${note.data.subtitle}` : note.data.title, pubDate: note.data.date, - description: note.data.title, + description: note.data.meta_description, link: `/notes/${note.id}`, - content, + content: (note.data.subtitle ? `