1.1.0 • Published 3 years ago

mdx-js-vue3 v1.1.0

Weekly downloads
10
License
MIT
Repository
-
Last release
3 years ago

@mdx-js/vue

Build Downloads Sponsors Backers Chat

Vue renderer for MDX: JSX in Markdown.

Install

npm:

npm install mdx-js-vue3

yarn:

yarn add mdx-js-vue3

Use

Say we have the following code in example.mdx:

# Hello, world! {1 + 1}

And our script, example.jsx:

import {MDXProvider} from 'mdx-js-vue3'
import Example from './example.mdx'
import {h} from 'vue'
const components = {
  h1: {
    render() {
      return h('h1', {style: {color: 'tomato'}}, this.$slots.default())
    }
  }
}