Fix titles.
This commit is contained in:
parent
5f2ad89d96
commit
311102e643
1 changed files with 5 additions and 3 deletions
|
|
@ -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,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue