Skip to content

yuyinws/vitepress-plugin-group-icons

Repository files navigation

vitepress-plugin-group-icons

npm version npm downloads bundle JSDocs License

Enhance code blocks features for VitePress.

vp-plugin-group-icons

📜 Documentation

Usage

Install

npm install vitepress-plugin-group-icons
yarn add vitepress-plugin-group-icons
pnpm add vitepress-plugin-group-icons
bun add vitepress-plugin-group-icons

Configuration

// .vitepress/config.ts
import { defineConfig } from 'vitepress'
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'

export default defineConfig({
  markdown: {
    config(md) {
      md.use(groupIconMdPlugin)
    },
  },
  vite: {
    plugins: [
      groupIconVitePlugin()
    ],
  }
})
// .vitepress/theme/index.ts
import Theme from 'vitepress/theme'
import 'virtual:group-icons.css'

export default Theme

Usage Example

::: code-group

```sh [npm]
npm install vitepress-plugin-group-icons
```

```sh [yarn]
yarn add vitepress-plugin-group-icons
```

```sh [pnpm]
pnpm add vitepress-plugin-group-icons
```

```sh [bun]
bun add vitepress-plugin-group-icons
```

:::

Credits

License

MIT License © 2024-PRESENT Leo