GitHub Flavored Markdown support addon for Storybook documentation.
69
A coding task to produce a helper that demonstrates how listing the GitHub Flavored Markdown addon in Storybook's addons array automatically enriches MDX compile options without manual wiring.
addons containing the Markdown addon and no docs.mdxCompileOptions provided, the produced MDX options include GitHub Flavored Markdown support via a remark plugin and leave other options unchanged. @testdocs.mdxCompileOptions already contains remarkPlugins or rehypePlugins, the returned options retain existing entries and append the GFM plugin only once. @testaddons; no direct configuration of the GFM plugin in the main config is needed, yet the resulting options still include it. @test@generates
export interface DocsMdxCompileOptions {
remarkPlugins?: unknown[];
rehypePlugins?: unknown[];
}
export interface StorybookMainConfig {
addons: string[];
docs?: {
mdxCompileOptions?: DocsMdxCompileOptions;
};
}
export function buildDocsMdxOptions(config: StorybookMainConfig): Promise<DocsMdxCompileOptions>;Adds GitHub Flavored Markdown support for Storybook MDX through an auto-loaded preset entry.
Install with Tessl CLI
npx tessl i tessl/npm-storybook--addon-mdx-gfm