diff --git a/astro.config.mjs b/astro.config.mjs index 74fec83329..817d05e93f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,6 @@ // @ts-check import { defineConfig } from 'astro/config'; +import { unified } from '@astrojs/markdown-remark'; import mdx from '@astrojs/mdx'; import sitemap from '@astrojs/sitemap'; import icon from 'astro-icon'; @@ -28,17 +29,19 @@ export default defineConfig({ // Link localization (Markdown links + raw HTML/JSX ``). Configuration — // localized sections, versioned sections, default version, and the "global" pages // exception — lives in the plugin defaults; no options needed here. - remarkPlugins: [remarkRewriteLocalizedLinks, remarkCodeTabs], - rehypePlugins: [ - rehypeRewriteLocalizedLinks, - rehypeSlug, - [ - rehypeAutolinkHeadings, - { - behavior: 'wrap', - }, + processor: unified({ + remarkPlugins: [remarkRewriteLocalizedLinks, remarkCodeTabs], + rehypePlugins: [ + rehypeRewriteLocalizedLinks, + rehypeSlug, + [ + rehypeAutolinkHeadings, + { + behavior: 'wrap', + }, + ], ], - ], + }), }, vite: { plugins: [ diff --git a/package-lock.json b/package-lock.json index dfcad77fba..4b124677d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "expressjs-website", "license": "CC-BY-SA-4.0", "dependencies": { + "@astrojs/markdown-remark": "^7.2.0", "@astrojs/mdx": "^6.0.1", "@astrojs/react": "^5.0.6", "@astrojs/rss": "^4.0.18", diff --git a/package.json b/package.json index faff5824d5..9db8d5cea3 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "test:e2e": "playwright test" }, "dependencies": { + "@astrojs/markdown-remark": "^7.2.0", "@astrojs/mdx": "^6.0.1", "@astrojs/react": "^5.0.6", "@astrojs/rss": "^4.0.18",