--- /** * /changelog — Liste reverse-chrono des versions livrées. * * Stratégie de rendu : `prerender = true` — le contenu vient de fichiers .md * versionnés dans le repo (cf. `src/content.config.ts`), donc tout est figé au * build. À chaque release, on bumpe `apps/web/src/version.ts` + on ajoute un * nouveau .md dans `src/content/changelog/`, puis le redéploiement régénère * le HTML. * * Design : * - Hero centré, eyebrow rubis + h1 display * - 2 colonnes desktop : feed cartes (gauche) + sticky rail (droite) * - 1 colonne mobile/tablette : pas de rail, juste le feed * - Anchors `#1.4.0` par version → partageables, scrollables * - JSON-LD : un `WebPage` avec `mainEntity` listant chaque release comme * `TechArticle`. Rich snippets dans Google. */ export const prerender = true; import Layout from "../../layouts/Layout.astro"; import { getCollection, render } from "astro:content"; const entries = (await getCollection("changelog")).sort( (a, b) => b.data.date.getTime() - a.data.date.getTime(), ); const rendered = await Promise.all( entries.map(async (entry) => { const { Content } = await render(entry); return { data: entry.data, Content }; }), ); const dateLong = new Intl.DateTimeFormat("fr-FR", { day: "numeric", month: "long", year: "numeric", }); const dateShort = new Intl.DateTimeFormat("fr-FR", { day: "2-digit", month: "short", }); const typeLabel: Record = { feature: "Nouveauté", improvement: "Amélioration", fix: "Correction", }; const title = "Changelog — ce qui change dans Rubis"; const description = "Toutes les nouveautés, améliorations et corrections livrées sur Rubis. Régulier, transparent, sans superlatifs."; const jsonLd = { "@context": "https://schema.org", "@type": "WebPage", name: title, description, url: "https://rubis.pro/changelog", publisher: { "@type": "Organization", name: "Rubis sur l'ongle", url: "https://rubis.pro", }, mainEntity: entries.map((e) => ({ "@type": "TechArticle", headline: e.data.title, datePublished: e.data.date.toISOString(), url: `https://rubis.pro/changelog#${e.data.version}`, version: e.data.version, })), }; --- {/* ============ Hero ============ */}

Tout ce qui change

Changelog

Les nouveautés, les améliorations, les corrections livrées sur Rubis. Régulier, transparent, sans superlatifs.

{/* ============ Body : feed + rail ============ */}
{/* Feed des versions */}
{ rendered.length === 0 ? (

Aucune entrée publiée pour l'instant.

) : (
    {rendered.map(({ data, Content }) => (
  1. {/* Header : chip version + type + date */}
    v{data.version} {typeLabel[data.type]}
    {/* Titre */}

    {data.title}

    {/* Highlights — bullets losanges rubis */}
      {data.highlights.map((h) => (
    • $1')} />
    • ))}
    {/* Body markdown — narrative courte */}
  2. ))}
) }
{/* Sticky rail — jump nav versions, desktop only */}
{/* Active state du rail via IntersectionObserver — vanilla JS, inline */}