feat: course website (Astro Starlight)

Pages (index, disclaimer, about), lockfile, root test:site script, fix for
Starlight 0.42 sidebar config and <details> rendering in generated MDX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Winther
2026-10-29 18:35:29 +01:00
co-authored by Claude Opus 5.5
parent d41496655e
commit 699d038d1c
8 changed files with 5230 additions and 3 deletions
+4
View File
@@ -131,6 +131,10 @@ export function mdxSafeProse(prose) {
let s = p.s.replace(/<!--[\s\S]*?-->/g, "");
s = s.replace(/[{}]/g, (c) => `\\${c}`);
s = s.replace(/<(?!\/?(?:details|summary)\s*>)/g, "&lt;");
// Put each details/summary tag on its own line with blank lines around it, so the
// markdown inside <details> is parsed as markdown rather than as JSX text.
s = s.replace(/[ \t]*(<details>|<\/details>|<summary>[^\n]*?<\/summary>)[ \t]*/g, "\n\n$1\n\n");
s = s.replace(/\n{3,}/g, "\n\n");
return s;
})
.join("");