feat(docs): add data script

* fetches npm & github info
* add vite plugin icons
This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent 9344365aff
commit 4d668f8b6d
12 changed files with 379 additions and 377 deletions
+12 -7
View File
@@ -1,10 +1,12 @@
import { config } from 'dotenv'
import { resolve } from 'path'
import { defineConfig, HeadConfig } from 'vitepress'
import head from './head'
import WindiCSS from 'vite-plugin-windicss'
import Icons from 'unplugin-icons/vite'
import Components from 'unplugin-vue-components/vite'
import svgLoader from 'vite-svg-loader'
import { demoPlugin } from './plugins/demo'
import head from './head'
config({ path: resolve(__dirname, '.env') })
@@ -26,9 +28,7 @@ export default defineConfig({
config: resolve(__dirname, './windi.config.ts'),
}) as any,
Components({
dirs: [
resolve(__dirname, './components')
],
dirs: [resolve(__dirname, './components')],
deep: true,
// allow auto load markdown components under `./src/components/`
extensions: ['vue', 'md'],
@@ -36,6 +36,10 @@ export default defineConfig({
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
dts: false,
}),
Icons({
// expiremental
autoInstall: true,
}),
],
},
@@ -54,15 +58,16 @@ export default defineConfig({
nav: [
{ text: 'Guide', link: '/', activeMatch: '^/$|^/guide/' },
{
text: 'Config Reference',
link: '/config/basics',
activeMatch: '^/config/',
text: 'Examples',
link: '/examples/basic',
activeMatch: '^/examples/',
},
],
},
markdown: {
config(md) {
md.use(demoPlugin)
return md
},
},