svelte-preprocess-md

Example

<script>
  import Component from './Component';
  let title = 'Hello World';
</script>

# {title}

<Component />

Usage

// rollup.config.js
import svelte from 'rollup-plugin-svelte';
import md from 'svelte-preprocess-md';

export default {
  // ...
  plugins: [
    svelte({
      extensions: ['.html', '.md'],
      preprocess: md()
    })
  ]
}

API

md([options, extend])

// ...
preprocess: md()

preprocess: md({ linkify: true })

preprocess: md(md => {
  return md
    .use(plugin1)
    .use(plugin2, options);
});

preprocess: md(
  { typographer: false},
  md => {
    return md
      .use(plugin3);
  }
)

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes