diff --git a/website/astro.config.mjs b/website/astro.config.mjs index 63d75d00..df3d89cb 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -8,6 +8,7 @@ import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'; import { readFileSync } from 'node:fs'; import { join } from 'node:path'; import { execSync } from 'node:child_process'; +import remarkGfm from 'remark-gfm'; import remarkBasePath from './src/plugins/remark-base-path.mjs'; import remarkHttpSnippets from './src/plugins/remark-http-snippets.mjs'; @@ -56,7 +57,13 @@ export default defineConfig({ output: 'static', server: { port: docPort }, markdown: { - remarkPlugins: [[remarkBasePath, { base }], remarkHttpSnippets], + // remarkGfm is listed explicitly because Astro applies its built-in GFM + // support to .md only. MDX inherits `remarkPlugins` but not that built-in, + // so without this every table in a .mdx page renders as literal pipe + // characters. Splitting content between the two extensions is not an + // option here: the HTTP snippet plugin below emits JSX, which only .mdx + // renders, and several guides need both tables and snippets. + remarkPlugins: [remarkGfm, [remarkBasePath, { base }], remarkHttpSnippets], }, integrations: [ starlight({ diff --git a/website/package.json b/website/package.json index 513b77f9..f2d171e8 100644 --- a/website/package.json +++ b/website/package.json @@ -20,8 +20,9 @@ "devDependencies": { "acorn": "^8.16.0", "httpsnippet-lite": "^3.0.5", + "remark-gfm": "^4.0.1", "starlight-openapi": "^0.25.1", "unist-util-visit": "^5.1.0", "worktree-env": "^0.1.0" } -} \ No newline at end of file +} diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 6781e0fb..9aa3e2dc 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -30,6 +30,9 @@ importers: httpsnippet-lite: specifier: ^3.0.5 version: 3.0.5 + remark-gfm: + specifier: ^4.0.1 + version: 4.0.1 starlight-openapi: specifier: ^0.25.1 version: 0.25.1(@astrojs/markdown-remark@7.2.0)(@astrojs/starlight@0.39.2(astro@6.4.8(@types/node@24.12.3)(rollup@4.62.2)))(astro@6.4.8(@types/node@24.12.3)(rollup@4.62.2))(openapi-types@12.1.3)