|
| 1 | +import { getAllContent } from "@/lib/content"; |
| 2 | + |
| 3 | +export const metadata = { |
| 4 | + title: "Changelog | Harness Guide", |
| 5 | + description: "Daily updates and changes to the Harness Engineering Guide", |
| 6 | +}; |
| 7 | + |
| 8 | +export default async function ChangelogPage() { |
| 9 | + const entries = await getAllContent("changelog"); |
| 10 | + const sorted = entries.sort((a, b) => (b.date || "").localeCompare(a.date || "")); |
| 11 | + |
| 12 | + return ( |
| 13 | + <div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 pt-24 pb-16"> |
| 14 | + <h1 className="font-[family-name:var(--font-heading)] text-4xl font-bold text-[var(--color-text-primary)] mb-2"> |
| 15 | + Changelog |
| 16 | + </h1> |
| 17 | + <p className="text-[var(--color-text-secondary)] mb-12"> |
| 18 | + Daily updates and changes to the Harness Engineering Guide. |
| 19 | + </p> |
| 20 | + |
| 21 | + <div className="relative"> |
| 22 | + {/* Timeline line */} |
| 23 | + <div className="absolute left-[7px] top-2 bottom-2 w-px bg-[var(--color-border)]" /> |
| 24 | + |
| 25 | + <div className="space-y-12"> |
| 26 | + {sorted.map((entry) => ( |
| 27 | + <article key={entry.slug} className="relative pl-8"> |
| 28 | + {/* Timeline dot */} |
| 29 | + <div className="absolute left-0 top-2 w-[15px] h-[15px] rounded-full bg-[var(--color-accent-cyan)] border-2 border-[var(--color-bg-primary)]" /> |
| 30 | + |
| 31 | + <time className="text-sm font-mono text-[var(--color-accent-cyan)] mb-1 block"> |
| 32 | + {entry.date} |
| 33 | + </time> |
| 34 | + <h2 className="text-xl font-semibold text-[var(--color-text-primary)] mb-4"> |
| 35 | + {entry.title} |
| 36 | + </h2> |
| 37 | + <div |
| 38 | + className="prose-custom text-[var(--color-text-secondary)]" |
| 39 | + dangerouslySetInnerHTML={{ __html: entry.contentHtml }} |
| 40 | + /> |
| 41 | + </article> |
| 42 | + ))} |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + |
| 46 | + {sorted.length === 0 && ( |
| 47 | + <p className="text-[var(--color-text-muted)] text-center py-20"> |
| 48 | + No changelog entries yet. Check back soon! |
| 49 | + </p> |
| 50 | + )} |
| 51 | + </div> |
| 52 | + ); |
| 53 | +} |
0 commit comments