Skip to content

Commit 89474de

Browse files
b3008claude
andcommitted
Enable remark-gfm for MDX table rendering in Storybook
Tables in .mdx attribute reference docs were not rendering because Storybook's MDX v2 parser doesn't support GFM tables by default. Adds remark-gfm plugin and configures addon-docs separately from addon-essentials so the plugin options are respected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2b64726 commit 89474de

33 files changed

Lines changed: 1432 additions & 410 deletions

.storybook/main.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
11
import type { StorybookConfig } from "@storybook/web-components-vite";
2+
import remarkGfm from "remark-gfm";
23

34
const config: StorybookConfig = {
45
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5-
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
6+
addons: [
7+
"@storybook/addon-links",
8+
{
9+
name: "@storybook/addon-essentials",
10+
options: {
11+
docs: false,
12+
},
13+
},
14+
{
15+
name: "@storybook/addon-docs",
16+
options: {
17+
mdxPluginOptions: {
18+
mdxCompileOptions: {
19+
remarkPlugins: [remarkGfm],
20+
},
21+
},
22+
},
23+
},
24+
],
625
framework: {
726
name: "@storybook/web-components-vite",
827
options: {},

0 commit comments

Comments
 (0)