From 311102e643e5bad3212d9818d59251d427075c1b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Sun, 6 Dec 2026 14:44:33 -0700 Subject: [PATCH] Fix titles. --- src/pages/rss.xml.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 ? `

${note.data.title}

${note.data.subtitle}

` : `

${note.data.title}

`) + content, }; }) );