Skip to content

Commit 7de9b7e

Browse files
author
coderzcr
committed
chore: 添加.nojekyll文件以禁用Jekyll处理
1 parent 5213c74 commit 7de9b7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.nojekyll

Whitespace-only changes.

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@
3838
<body>
3939
<div id="app"></div>
4040
<script>
41+
// 动态设置basePath,适配本地开发和GitHub Pages部署
42+
const isGitHubPages = window.location.hostname.endsWith('github.io');
4143
window.$docsify = {
4244
name: 'JavaWeb项目源码库',
4345
repo: 'coderzcr/JavaWeb-Project-Source-Share',
4446
loadSidebar: true,
4547
subMaxLevel: 0,
4648
auto2top: true,
4749
coverpage: true,
48-
basePath: './',
49-
relativePath: true,
50+
basePath: isGitHubPages ? '/JavaWeb-Project-Source-Share/' : './',
51+
homepage: isGitHubPages ? 'README.md' : undefined,
5052
search: {
5153
maxAge: 86400000,
5254
paths: 'auto',

0 commit comments

Comments
 (0)