mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-25 10:21:40 +00:00
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:
@@ -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: {
|
||||
remarkPlugins: [
|
||||
[remarkGithubAdmonitionsToDirectives, { mapping: githubAdmonitionMapping }],
|
||||
],
|
||||
// Astro 7 deprecated top-level `remarkPlugins`/`rehypePlugins`/
|
||||
// `remarkRehype` in favour of configuring the unified pipeline directly.
|
||||
processor: unified({
|
||||
remarkPlugins: [
|
||||
[
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user