Skip to content

CollierCZ/markdoc-svelte

Repository files navigation

markdoc-svelte

Process Markdown and Markdoc files into Svelte components using Markdoc. Use Markdoc defaults out of the box or configure Markdoc schema to your needs.

Install

Install markdoc-svelte in your SvelteKit project.

npm install markdoc-svelte

Amend your SvelteKit config in svelte.config.js to:

  • Process files with the extensions you choose (such as .mdoc and .md).
  • Include the preprocessor.
import { markdocPreprocess } from "markdoc-svelte";

/** @type {import('@sveltejs/kit').Config} */
const config = {
  extensions: [".svelte", ".mdoc", ".md"],
  preprocess: [markdocPreprocess()],
};

Docs

See full examples and more options at the markdown-svelte docs.

About

A Svelte preprocessor for Markdoc

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •