mdsvex
Markdown preprocessor for Svelte that lets Svelte components and Markdown be written in the same document.
mdsvex.pngwn.at/repositorydocs
mdsvex brings Markdown into Svelte projects. It is added as a preprocessor to a Svelte build with rollup or webpack, which then passes .svx files through it, or its compile function turns a document into Svelte code without hooking into the Svelte compiler. The docs say it supports all Svelte syntax and almost all Markdown syntax, so a Markdown document can import and use Svelte components. Parsing runs on unified, remark and rehype, and remark and rehype plugins can be passed in as options.
The repository is a monorepo that also holds packages for working with Svelte syntax trees.
Worth knowing
A code block indented by four spaces does nothing in mdsvex, since indentation is common in XML-based languages.
Identity
- Status
- Active
- Maintainer
- pngwn4
- Maintained by
- Individual
- First release
- 20195
Rendering and deploy
- Install with
- npm3
Releases
Adoption
Sources
- 2026-11-16: links
mdsvex.pngwn.at/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/pngwn/MDsveX - 2026-11-16: links, Built on, Templating, Install with
mdsvex.pngwn.at/docs - 2026-11-16: Maintainer, License, License model
github.com/pngwn/MDsveX/blob/main/LICENSE - 2026-11-16: First release, Last release
registry.npmjs.org/mdsvex - 2026-11-16: Categories
github.com/pngwn/MDsveX/blob/main/README.md - 2026-11-16: Current major version
api.github.com/repos/pngwn/MDsveX/releases - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/mdsvex - 2026-11-16: Contributors
api.github.com/repos/pngwn/MDsveX/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/mdsvex