fix(docs): improve base path handling for vercel and github pages
Use withBase helper from vitepress to handle base paths consistently Simplify vercel environment detection logic in config
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
// 判断是否是 Vercel 环境, github page 和 vercel 的部署地址相关不一样
|
||||
const isVercel = process.env.VERCEL === '1'
|
||||
const base = isVercel ? '/' : '/easy-vibe/'
|
||||
const isVercel = process.env.VERCEL === '1' || !!process.env.VERCEL_URL
|
||||
const base = process.env.BASE || (isVercel ? '/' : '/easy-vibe/')
|
||||
|
||||
// 语言映射配置
|
||||
const localeMap = {
|
||||
|
||||
Reference in New Issue
Block a user