Skip to content

A VitePress plugin to display both a preview and code example for a component.

License

Notifications You must be signed in to change notification settings

basmilius/vitepress-plugin-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VitePress Examples

This repository contains the source code for the VitePress Examples plugin. This plugin is able to show code examples that include a preview.

🚀 Installation

To install the plugin, add the vitepress-plugin-example package to your project using pnpm install vitepress-plugin-example and add the following to your VitePress config:

import examplePlugin from 'vitepress-plugin-example';

export default defineConfig({
    // ...
    markdown: {
        config(md) {
            md.use(examplePlugin);
        }
    }
    // ... 
});

👀 Usage

::: example
example=../path/to/file.vue
:::

About

A VitePress plugin to display both a preview and code example for a component.

Resources

License

Stars

Watchers

Forks

Sponsor this project