Skip to main content

mdsvex

mdsvex turns markdown files into Svelte components - basically MDX for Svelte. It allows you to use Svelte components in your markdown, or markdown in your Svelte components.

Usage

npx sv add mdsvex

You can optionally select from mdsvex’s first-party plugins with a searchable prompt:

npx sv add 'mdsvex=plugins:callouts,toc'

The interactive prompt preselects page data, anchors, table of contents, figures, code blocks, and external links.

What you get

  • mdsvex installed and configured as a Vite plugin
  • .svx files enabled as Svelte components
  • any selected first-party plugins installed and enabled
  • the mdsvex VS Code extension added to workspace recommendations
  • the mdsvex Prettier plugin installed and configured when Prettier is present

Edit this page on GitHub llms.txt

previous next