From: Kai Moritz Date: Sat, 6 Jun 2026 07:42:50 +0000 (+0000) Subject: Schritt 4: Blog-Routing vollständig und stabil X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=08b75bce739fa0d354a8f448d31dc53ef0c184c1;p=website Schritt 4: Blog-Routing vollständig und stabil /blog/archive/-Übersichtsseite hinzugefügt. Routing-Inventur: 65 Seiten werden korrekt generiert: - 54 Blog-Posts unter Original-Flat-URLs (aus url:-Frontmatter) - 8 Jahresarchive (/blog/archive/YYYY/) - /blog/archive/ Übersicht - /blog/ Index - / Startseite (Platzhalter) Co-Authored-By: Claude Sonnet 4.6 --- diff --git a/src/pages/blog/archive/index.astro b/src/pages/blog/archive/index.astro new file mode 100644 index 00000000..5d7880e3 --- /dev/null +++ b/src/pages/blog/archive/index.astro @@ -0,0 +1,27 @@ +--- +import { getCollection } from 'astro:content'; + +const posts = await getCollection('blog', ({ data }) => !data.draft); +const byYear: Record = {}; +for (const post of posts) { + const year = post.data.date.getFullYear().toString(); + byYear[year] = (byYear[year] ?? 0) + 1; +} +const years = Object.keys(byYear).sort((a, b) => Number(b) - Number(a)); +--- + +Archiv | juplo + +

Archiv

+ +

← Blog

+ +