在 markdown 中书写 vue demo,支持 vite/vitepress。
The vite-plugin-markdown-preview is a markdown code block preview plugin based on Vite/Vitepress. It replaces vue code blocks in markdown documents with vue components that have the preview tag.
To install the vite-plugin-markdown-preview, follow these steps:
Install the necessary dependencies:
npm install vite-plugin-markdown-preview unplugin-vue-markdown
Configure the plugin in your Vitepress project by updating the .vitepress/config.ts file.
Use the plugin in your Vite project by specifying it in the dependencies.
The vite-plugin-markdown-preview is a useful tool for Vite/Vitepress users to enhance their markdown documents by replacing vue code blocks with vue components for easy previewing. Additionally, it offers the flexibility of customizing the preview components to meet specific design requirements.