vitepress-allyouneed 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/vitepress.cjs +10 -4
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.js +10 -4
- package/dist/vitepress.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/);版本号遵循 [SemVer](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.3.1] - 2026-05-20
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **空目录假 URL 导致 MIME 404**
|
|
9
|
+
|
|
5
10
|
## [0.3.0] - 2026-05-20
|
|
6
11
|
|
|
7
12
|
正式版。汇集 v0.3 全部新功能(Obsidian 语法 6 模块、sidebar 自动生成全套、DocHeader banner、i18n 集成、`_sidebar.md` 覆盖等),并修两个 deploy 关键 bug。
|
package/dist/index.cjs
CHANGED
|
@@ -2939,8 +2939,12 @@ function toPerFolderSidebar(root, opts, options, index) {
|
|
|
2939
2939
|
/* isTopLevel */
|
|
2940
2940
|
true
|
|
2941
2941
|
)) {
|
|
2942
|
-
const firstUrl = child.dirIndex && !child.dirIndexEmpty ? child.dirIndex.url : findFirstPageUrl(child, opts)
|
|
2943
|
-
|
|
2942
|
+
const firstUrl = child.dirIndex && !child.dirIndexEmpty ? child.dirIndex.url : findFirstPageUrl(child, opts);
|
|
2943
|
+
if (firstUrl) {
|
|
2944
|
+
rootItems.push({ text: labelText, link: firstUrl });
|
|
2945
|
+
} else {
|
|
2946
|
+
rootItems.push({ text: labelText });
|
|
2947
|
+
}
|
|
2944
2948
|
} else {
|
|
2945
2949
|
rootItems.push({ text: labelText });
|
|
2946
2950
|
}
|
|
@@ -2995,10 +2999,12 @@ function generateNav(index, options, autoOptions = {}) {
|
|
|
2995
2999
|
}
|
|
2996
3000
|
const text = computeGroupText(child.path, child.dirIndex, opts);
|
|
2997
3001
|
let link;
|
|
2998
|
-
if (child.dirIndex) {
|
|
3002
|
+
if (child.dirIndex && !child.dirIndexEmpty) {
|
|
2999
3003
|
link = stripBase(child.dirIndex.url, base);
|
|
3000
3004
|
} else {
|
|
3001
|
-
|
|
3005
|
+
const first = findFirstPageUrl(child, opts);
|
|
3006
|
+
if (!first) continue;
|
|
3007
|
+
link = first;
|
|
3002
3008
|
}
|
|
3003
3009
|
const escapedPrefix = `/${key}/`.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3004
3010
|
out.push({ text, link, activeMatch: "^" + escapedPrefix });
|