Learn What mdsvex is

Source

mdsvex is a markdown preprocessor for Svelte components. Basically MDX for Svelte.

This preprocessor allows you to use Svelte components in your markdown, or markdown in your Svelte components.

mdsvex supports all Svelte syntax and its own flavour of markdown, which differs from CommonMark in a few places. See Markdown for what is different and limitations for what is missing.

You can do this:

import Chart from '#lib/Chart.svelte';

# Here’s a chart

The chart is rendered inside our mdsvex document.

<Chart />

mdsvex has its own markdown parser, and parse plugins can change the tree it builds.

Try it

mdsvex, markdown with Svelte in it. MIT licence.