1.1.0 • Published 3 years ago
mdx-js-vue3 v1.1.0
@mdx-js/vue
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())
}
}
}