Skip to content

How to install plugin? #14

Answered by ivodolenc
bugproof asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, just install the plugin according to the official instructions and add it to the appropriate plugins option, in this case it is remark option:

// svelte.config.js

import adapter from '@sveltejs/adapter-static'
import { svelteMarkdown } from '@sveltek/markdown'
import remarkGfm from 'remark-gfm'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: [
    svelteMarkdown({
      plugins: {
        remark: [remarkGfm],
        // rehype: [] // you can also add `rehype` plugins
      },
    }),
  ],
  extensions: ['.svelte', '.md'],
  kit: { adapter: adapter() },
}

export default config

Also, you can specify plugins in multiple ways, at the global, layout or entry

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ivodolenc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants