fix(website): migrate markdown remark plugins to unified processor

Astro 7 deprecates markdown.remarkPlugins in favour of passing a
unified() processor from @astrojs/markdown-remark. Moves the GitHub
admonitions plugin into markdown.processor, clearing the startup
deprecation warning. shikiConfig stays at the markdown level as it is
not part of UnifiedProcessorOptions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 80686fef-efe3-4cdd-8cd6-bfa61a5d0af6
This commit is contained in:
Aaron Powell
2026-08-17 15:11:05 +10:00
parent 82615220c4
commit 6f43c94da3
+9 -1
View File
@@ -1,5 +1,6 @@
import sitemap from "@astrojs/sitemap";
import react from "@astrojs/react";
import { unified } from "@astrojs/markdown-remark";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
@@ -45,9 +46,16 @@ export default defineConfig({
base: "/",
output: "static",
markdown: {
// Astro 7 deprecated top-level `remarkPlugins`/`rehypePlugins`/
// `remarkRehype` in favour of configuring the unified pipeline directly.
processor: unified({
remarkPlugins: [
[remarkGithubAdmonitionsToDirectives, { mapping: githubAdmonitionMapping }],
[
remarkGithubAdmonitionsToDirectives,
{ mapping: githubAdmonitionMapping },
],
],
}),
// The prototype's own code blocks (SyntaxHighlightedCode.tsx) are styled
// entirely through brand CSS tokens rather than baked-in theme colours, so
// they automatically match the site's light/dark mode. Raw markdown code