diff --git a/src/components/VersionSelector.svelte b/src/components/VersionSelector.svelte
index 9a70a68..64d3499 100644
--- a/src/components/VersionSelector.svelte
+++ b/src/components/VersionSelector.svelte
@@ -12,7 +12,17 @@
let { releases, selected, onselect, loading, error }: Props = $props();
- let changelogHtml = $derived(selected?.body ? marked.parse(selected.body) : "");
+ // Tag Keep-a-Changelog section headings so CSS can color-code them
+ // (Added → green, Changed → yellow, Fixed → blue, etc.).
+ function renderBody(body: string): string {
+ const html = marked.parse(body) as string;
+ return html.replace(
+ /
(Added|Changed|Fixed|Removed|Deprecated|Security)<\/h3>/g,
+ (_, text) => `${text}
`,
+ );
+ }
+
+ let changelogHtml = $derived(selected?.body ? renderBody(selected.body) : "");
function handleChange(e: Event) {
const tag = (e.target as HTMLSelectElement).value;
@@ -61,49 +71,14 @@
{#if selected && changelogHtml}
-
-
Changelog
-
+
+
Changelog
+
+
{@html changelogHtml}
{/if}
{/if}
-
-
diff --git a/src/styles/global.css b/src/styles/global.css
index fb99c8f..336c581 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -70,4 +70,150 @@
padding: 1rem;
font-size: 0.875rem;
}
+
+ /* Changelog typography (markdown rendered from GitHub release bodies).
+ Kept here rather than in VersionSelector.svelte because the Astro +
+ Svelte 5 build pipeline wasn't emitting the component's