|
@@ -2,6 +2,8 @@ import { defineConfig } from 'vitepress'
|
|
import { CustomAvatars } from './constant'
|
|
import { CustomAvatars } from './constant'
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
|
|
import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
|
|
|
|
+import { demoPreviewPlugin } from '@vitepress-code-preview/plugin'
|
|
|
|
+import { viteDemoPreviewPlugin } from '@vitepress-code-preview/plugin'
|
|
|
|
|
|
export default defineConfig({
|
|
export default defineConfig({
|
|
base: '/efe-docs/',
|
|
base: '/efe-docs/',
|
|
@@ -124,6 +126,7 @@ export default defineConfig({
|
|
items: [
|
|
items: [
|
|
{ text: 'article 详情页', link: '/article/' },
|
|
{ text: 'article 详情页', link: '/article/' },
|
|
{ text: 'quick-monitor<br>项目、企业、业主监控', link: '/quick-monitor/' },
|
|
{ text: 'quick-monitor<br>项目、企业、业主监控', link: '/quick-monitor/' },
|
|
|
|
+ { text: 'quick-search<br>标讯、企业、采购搜索', link: '/quick-search/' },
|
|
]
|
|
]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
@@ -207,6 +210,16 @@ export default defineConfig({
|
|
rollupOptions: {
|
|
rollupOptions: {
|
|
external: ["vue/server-renderer"]
|
|
external: ["vue/server-renderer"]
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ plugins: [
|
|
|
|
+ viteDemoPreviewPlugin()
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ markdown: {
|
|
|
|
+ config(md) {
|
|
|
|
+ md.use(demoPreviewPlugin, {
|
|
|
|
+ docRoot: '../'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ },
|
|
})
|
|
})
|