Add description exports and collapse characters from same user
This commit is contained in:
parent
2990644f87
commit
d4a9dc9dbc
78 changed files with 693 additions and 247 deletions
|
|
@ -8,11 +8,11 @@ type FeedItem = RSSFeedItem & {
|
|||
};
|
||||
|
||||
export const GET: APIRoute = async ({ site }) => {
|
||||
const stories = (await getCollection("stories")).filter((story) => !story.data.isDraft);
|
||||
const games = (await getCollection("games")).filter((game) => !game.data.isDraft);
|
||||
const stories = await getCollection("stories", (story) => !story.data.isDraft);
|
||||
const games = await getCollection("games", (game) => !game.data.isDraft);
|
||||
return rss({
|
||||
title: "Gallery | Bad Manners",
|
||||
description: "Stories, games, and more by Bad Manners",
|
||||
description: "Stories, games, and (possibly) more by Bad Manners",
|
||||
site: site as URL,
|
||||
items: [
|
||||
stories.map<FeedItem>((story) => ({
|
||||
|
|
@ -21,7 +21,7 @@ export const GET: APIRoute = async ({ site }) => {
|
|||
link: `/stories/${story.slug}`,
|
||||
description:
|
||||
`Word count: ${story.data.wordCount}. ${story.data.contentWarning} ${story.data.descriptionPlaintext || story.data.description}`
|
||||
.replaceAll(/\n+| +/g, " ")
|
||||
.replaceAll(/[\n ]+/g, " ")
|
||||
.trim(),
|
||||
categories: ["story"],
|
||||
})),
|
||||
|
|
@ -30,7 +30,7 @@ export const GET: APIRoute = async ({ site }) => {
|
|||
pubDate: addHours(game.data.pubDate, 12),
|
||||
link: `/games/${game.slug}`,
|
||||
description: `${game.data.contentWarning} ${game.data.descriptionPlaintext || game.data.description}`
|
||||
.replaceAll(/\n+| +/g, " ")
|
||||
.replaceAll(/[\n ]+/g, " ")
|
||||
.trim(),
|
||||
categories: ["game"],
|
||||
})),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue