Improve schema and update tags

- Make constants in schema explicit
- Enumerate tag-categories
- More i18n utilities
- Better anonymous user support without special field
- Remove most tuples and unchecked type-casting
This commit is contained in:
Bad Manners 2024-07-26 15:48:57 -03:00
parent 579e5879e1
commit 17ef8c652c
34 changed files with 223 additions and 221 deletions

View file

@ -49,7 +49,7 @@ export const GET: APIRoute = async ({ site }) => {
pubDate: toNoonUTCDate(data.pubDate!),
link: `/stories/${slug}`,
description:
`${t(data.lang, "story/warnings", data.wordCount || "???", data.contentWarning.trim())}\n\n${markdownToPlaintext(data.description)}`
`${t(data.lang, "story/warnings", data.wordCount, data.contentWarning.trim())}\n\n${markdownToPlaintext(data.description)}`
.replaceAll(/[\n ]+/g, " ")
.trim(),
categories: ["story"],