There was an error while loading. Please reload this page.
1 parent a86e094 commit 3f563b2Copy full SHA for 3f563b2
1 file changed
docs/.vitepress/config.mts
@@ -1,6 +1,12 @@
1
import { defineConfig } from 'vitepress'
2
3
-const base = process.env.BASE_PATH ?? '/'
+const repositoryName = process.env.GITHUB_REPOSITORY?.split('/')[1]
4
+const isGitHubActions = process.env.GITHUB_ACTIONS === 'true'
5
+const isUserSite = repositoryName?.endsWith('.github.io')
6
+const githubPagesBase = isGitHubActions && repositoryName && !isUserSite
7
+ ? `/${repositoryName}/`
8
+ : '/'
9
+const base = process.env.BASE_PATH ?? githubPagesBase
10
11
export default defineConfig({
12
title: 'CJIT',
0 commit comments