@@ -2,6 +2,7 @@ import tabsPlugin from '@snippetors/vuepress-plugin-tabs'
22import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
33import { pwaPlugin } from '@vuepress/plugin-pwa'
44import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
5+ import { searchPlugin } from '@vuepress/plugin-search'
56import { defaultTheme } from '@vuepress/theme-default'
67import {
78 defineUserConfig ,
@@ -12,6 +13,7 @@ import {
1213 type HeadConfig ,
1314 type HeadTagEmpty
1415} from 'vuepress'
16+ import { version } from '../../package.json'
1517
1618const GA_MEASUREMENT_ID = 'UA-82107035-1'
1719const GOOGLE_SITE_VERIFICATION = '4nm40QLVcDJmEJSAbrMfZ7fpBJZIXL1oSngBAYrZopY'
@@ -28,6 +30,7 @@ export default defineUserConfig({
2830 head : getHead ( ) ,
2931 plugins : getPlugins ( ) ,
3032 theme : defaultTheme ( {
33+ version,
3134 logo : '/assets/img/logo.png' ,
3235 repo : 'krisk/fuse' ,
3336 docsDir : 'docs' ,
@@ -93,6 +96,7 @@ function getPlugins(): PluginConfig {
9396 // id: GOOGLE_AD_CLIENT_ID,
9497 // },
9598 // ],
99+ searchPlugin ( ) ,
96100 googleAnalyticsPlugin ( {
97101 id : GA_MEASUREMENT_ID
98102 } ) ,
@@ -105,7 +109,8 @@ function getPlugins(): PluginConfig {
105109 ...getComponent ( 'Team' ) ,
106110 ...getComponent ( 'Jobs' ) ,
107111 ...getComponent ( 'Donate' ) ,
108- ...getComponent ( 'TwitterFollow' )
112+ ...getComponent ( 'TwitterFollow' ) ,
113+ ...getComponent ( 'Version' )
109114 }
110115 } ) ,
111116 pwaPlugin ( )
@@ -178,3 +183,9 @@ function getHead(): HeadConfig[] {
178183 ...scripts
179184 ]
180185}
186+
187+ declare module '@vuepress/theme-default' {
188+ export interface DefaultThemeLocaleData {
189+ version : string
190+ }
191+ }
0 commit comments