浏览代码

feat: version + base 优化

Burt 1 年之前
父节点
当前提交
af45c69784
共有 2 个文件被更改,包括 2 次插入4 次删除
  1. 1 2
      docs/.vitepress/config.mts
  2. 1 2
      docs/.vitepress/theme/components/NavBarTitleAfter.vue

+ 1 - 2
docs/.vitepress/config.mts

@@ -7,8 +7,7 @@ const buildTime = dayjs().format('yyyy-MM-dd HH:mm:ss')
 // https://vitepress.dev/reference/site-config
 export default defineConfig({
   lang: 'zh-CN',
-  base: '/unibest-docs/',
-  // base: '/',
+  base: '/',
   title: 'unibest',
   description: '最好用的 uniapp 开发模板',
   lastUpdated: true,

+ 1 - 2
docs/.vitepress/theme/components/NavBarTitleAfter.vue

@@ -1,6 +1,5 @@
 <script setup lang="ts">
-// TODO: 从远程地址获取版本号
-const version = '2.5.0'
+import { version } from '../../../../package.json'
 </script>
 
 <template>