add: SEO for articles

SEO and SchemaORg for articles
This commit is contained in:
webfussel 2025-06-14 10:23:46 +02:00
parent f1cb4048a4
commit d6859cdaad
22 changed files with 198 additions and 125 deletions

15
app/utils/error.ts Normal file
View file

@ -0,0 +1,15 @@
import type { NuxtError } from 'nuxt/app'
const codes: Record<number, string> = {
400: 'Hey, deine Anfrage war irgendwie kaputt. Check nochmal!',
404: 'Sorry bro, aber diese Seite existiert einfach nicht.',
408: 'Alter, das hat viel zu lange gedauert. Timeout!',
410: 'Diese Seite ist für immer weg. Gone!',
500: 'Crap, da ging was im Hintergrund schief. Sorry!',
501: 'Das haben wir noch nicht implementiert. Oops!',
502: 'Der Server dahinter spinnt gerade rum.',
503: 'Service ist gerade down. Versuch es später nochmal.',
504: 'Gateway Timeout - da hängt was fest.',
}
export const getErrorMessage = (error: NuxtError) => codes[error.statusCode] ?? 'Sorry, da ist etwas schief gelaufen.'