Skip to content

Commit 89f1247

Browse files
docs: add vitepress-plugin-group-icons (#1056)
1 parent b4276d8 commit 89f1247

File tree

9 files changed

+130
-14
lines changed

9 files changed

+130
-14
lines changed

docs/.vitepress/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { DefaultTheme } from 'vitepress'
22
import { defineConfig } from 'vitepress'
3+
import { groupIconMdPlugin } from 'vitepress-plugin-group-icons'
34
import vite from './vite.config'
45

56
const GETTING_STARTED: DefaultTheme.NavItemWithLink[] = [
@@ -39,6 +40,9 @@ export default defineConfig({
3940
light: 'vitesse-light',
4041
dark: 'vitesse-dark',
4142
},
43+
config(md) {
44+
md.use(groupIconMdPlugin)
45+
},
4246
},
4347

4448
cleanUrls: true,

docs/.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Theme from 'vitepress/theme'
33
import { h } from 'vue'
44
import 'uno.css'
55
import './style.css'
6+
import 'virtual:group-icons.css'
67

78
export default {
89
extends: Theme,

docs/.vitepress/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { fileURLToPath } from 'node:url'
22
import UnoCSS from 'unocss/vite'
33
import Components from 'unplugin-vue-components/vite'
44
import { defineConfig } from 'vite'
5+
import { groupIconVitePlugin } from 'vitepress-plugin-group-icons'
56

67
export default defineConfig({
78
plugins: [
@@ -13,6 +14,7 @@ export default defineConfig({
1314
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
1415
extensions: ['vue', 'md'],
1516
}),
17+
groupIconVitePlugin(),
1618
UnoCSS(
1719
fileURLToPath(new URL('./uno.config.ts', import.meta.url)),
1820
),

docs/getting-started/open-in-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Starting from **v7.2.0**, you can specify the editor by `launchEditor` option:
1212

1313
This is a list of [supported editors](https://github.com/yyx990803/launch-editor?tab=readme-ov-file#supported-editors), please ensure that the editor's environment variables are correctly configured beforehand.
1414

15-
```ts
15+
```ts [vite.config.ts]
1616
import VueDevTools from 'vite-plugin-vue-devtools'
1717

1818
export default defineConfig({

docs/guide/vite-plugin.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ $ bun add -D vite-plugin-vue-devtools
3030

3131
## Usage
3232

33-
```ts
34-
// Configuration Vite
35-
33+
```ts [vite.config.ts]
3634
import { defineConfig } from 'vite'
3735
import vueDevTools from 'vite-plugin-vue-devtools'
3836

docs/help/faq.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Starting from **v7.2.0**, you can specify the editor by `launchEditor` option:
1010

1111
This is a list of [supported editors](https://github.com/yyx990803/launch-editor?tab=readme-ov-file#supported-editors), please ensure that the editor's environment variables are correctly configured beforehand.
1212

13-
```ts
13+
```ts [vite.config.ts]
1414
import VueDevTools from 'vite-plugin-vue-devtools'
1515

1616
export default defineConfig({
@@ -25,7 +25,7 @@ export default defineConfig({
2525

2626
## How to work with Laravel Vite Plugin?
2727

28-
```ts
28+
```ts [vite.config.ts]
2929
import laravel from 'laravel-vite-plugin'
3030
import { defineConfig } from 'vite'
3131
import VueDevTools from 'vite-plugin-vue-devtools'
@@ -48,9 +48,7 @@ export default defineConfig({
4848
We still recommend using [Nuxt DevTools](https://github.com/nuxt/devtools) for a better development experience.
4949
:::
5050

51-
```ts
52-
// nuxt.config.ts
53-
51+
```ts [nuxt.config.ts]
5452
export default defineNuxtConfig({
5553
vite: {
5654
plugins: [
@@ -64,7 +62,7 @@ export default defineNuxtConfig({
6462

6563
## How to work with [Vite Ruby](https://vite-ruby.netlify.app/)?
6664

67-
```ts
65+
```ts [vite.config.ts]
6866
import vue from '@vitejs/plugin-vue'
6967
import { defineConfig } from 'vite'
7068
import RubyPlugin from 'vite-plugin-ruby'
@@ -83,8 +81,7 @@ export default defineConfig({
8381

8482
## How to work with [WXT](https://wxt.dev/)?
8583

86-
```ts
87-
// wxt.config.ts
84+
```ts [wxt.config.ts]
8885
import devtools from 'vite-plugin-vue-devtools'
8986
import { defineConfig } from 'wxt'
9087

docs/help/troubleshooting.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ If you see devtools render as follows:
88

99
And you are using `vite-plugin-html`, please make sure register `vite-plugin-vue-devtools` before `vite-plugin-html`.
1010

11-
```ts
12-
// vite.config.ts
11+
```ts [vite.config.ts]
1312
import { defineConfig } from 'vite'
1413
import { createHtmlPlugin } from 'vite-plugin-html'
1514
import vueDevTools from 'vite-plugin-vue-devtools'

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@vueuse/core": "catalog:",
1313
"unplugin-vue-components": "^29.1.0",
1414
"vitepress": "1.6.4",
15+
"vitepress-plugin-group-icons": "^1.7.1",
1516
"vue": "catalog:"
1617
}
1718
}

pnpm-lock.yaml

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)