0.0.5 • Published 7 months ago

md-demo-plugins-fd v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

md-demo-plugins-fdvitepress-demo-block-fd 配合使用在 VirePress 里面支持demo-block

步骤 1: 增加 markdown 插件

安装插件 pnpm add md-demo-plugins-fd -D

// .vitepress/config.js
import { applyPlugins } from 'md-demo-plugins-fd';

export default defineConfig({
  markdown: {
    config: (md) => {
      applyPlugins(md);
    },
  },
});

步骤 2: 注册 demo 组件

安装插件 pnpm add vitepress-demo-block-fd -D

// docs/.vitepress/theme/index.ts
import DemoBlock from 'vitepress-demo-block-fd';
import 'vitepress-demo-block-fd/dist/style.css';

export default {
  ...DefaultTheme,
  enhanceApp({ app, router, siteData }) {
    app.component('demo', DemoBlock);
  },
};
0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago