Fix titles.

This commit is contained in:
Benjamin A. Shelton 2026-12-06 14:44:33 -07:00
commit 311102e643
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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 ? `<h1>${note.data.title}</h1><h2>${note.data.subtitle}</h2>` : `<h1>${note.data.title}</h1>`) + content,
};
})
);