{"repo":"privatenumber/vite-vue-md","free":true,"listed":false,"github":"https://github.com/privatenumber/vite-vue-md","clone":"git clone https://github.com/privatenumber/vite-vue-md.git","description":"Vite plugin for importing Markdown files as Vue components. Works with Vue 2 & 3","language":"TypeScript","stars":12,"topics":["markdown","plugin","vite","vue"],"license":"MIT","category":"productivity","readme_excerpt":"vite-vue-md This Vite plugin adds support for importing a Markdown file as a Vue component. Works with Vue 2 & 3. Vue.js Demo Blocks Render your Vue.js code blocks inline by simply adding demo next to the language name. For example, when this Markdown file is rendered with this plugin, you'll see a clickable button here: Install Setup In your vite.config.js file: 1. Import vite-vue-md and add it to the plugins array. 2. In your vue() plugin options, add a include option that includes .md files. vite.config.js : Demo Blocks Demo Blocks are Vue.js code blocks that are rendered inline. They're useful for documentation docs to show off your components without compromising the readability of the Markdown file on GitHub. To compile a Vue.js codeblock as a Demo Block , add demo next to the language name: vue demo const clickHandler = () = alert('Clicked!'); Click me Multi-file demos The entry point for demo blocks must be a Vue.js component. But you can import other code blocks in any language from the same Markdown file. For non-entry files, set a file name via demo= . Then import it from the Vue.js demo block via the doc: protocol: vue demo import { clickHandler } from 'doc:click-handler.js' Click me js demo=click-handler.js export const clickHandler = () = alert('Clicked!') Demo + Code blocks Since the code blocks are rendered inline, they're replaced by the actual Vue.js component. To show the code block, you can add a onDemo callback to the plugin options: Options include Type:","default_branch":null,"files":null,"tree":[],"storefront":"/r/privatenumber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/privatenumber/vite-vue-md/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}