vitepress-allyouneed 0.3.0-beta.2 → 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 +18 -2
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/markdown-it.cjs.map +1 -1
- package/dist/markdown-it.js.map +1 -1
- package/dist/vite.cjs +3 -2
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.js +3 -2
- package/dist/vite.js.map +1 -1
- package/dist/vitepress.cjs +13 -6
- package/dist/vitepress.cjs.map +1 -1
- package/dist/vitepress.js +13 -6
- package/dist/vitepress.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,25 @@
|
|
|
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.
|
|
5
|
+
## [0.3.1] - 2026-05-20
|
|
6
|
+
|
|
6
7
|
### Fixed
|
|
7
|
-
-
|
|
8
|
+
- **空目录假 URL 导致 MIME 404**
|
|
9
|
+
|
|
10
|
+
## [0.3.0] - 2026-05-20
|
|
11
|
+
|
|
12
|
+
正式版。汇集 v0.3 全部新功能(Obsidian 语法 6 模块、sidebar 自动生成全套、DocHeader banner、i18n 集成、`_sidebar.md` 覆盖等),并修两个 deploy 关键 bug。
|
|
13
|
+
|
|
14
|
+
### Fixed(0.3.0-beta.0 → 0.3.0)
|
|
15
|
+
- **build-mode base 双重 prefix → 404**:`entry.url` 之前**包含 base**(`/<base>/foo`),VitePress render 时**再** prepend base → `/<base>/<base>/foo` → GitHub Pages 等子路径部署全部 404。现 `computeUrl` 始终输出**不带 base 的 site-root 相对 URL**(`/foo`),VitePress 统一 prepend。影响 wikilink `<a href>`、sidebar/nav link、per-folder Record key、`_perspectives_/` fallback 等所有内部 URL。
|
|
16
|
+
- **i18n nav 注入丢失**:VitePress i18n 下 `themeConfig.locales[lang].themeConfig.nav` 覆盖顶层 nav,Perspectives 下拉在 EN locale 消失。wrapper 现在给**所有 locale 的 nav** 都注入。
|
|
17
|
+
- **跨 locale nav 链接 404**:EN locale 写 `link: '/test/'` 被解释为 locale-relative `/en/test/`。example 配置已修正(EN nav 只列已翻译 page)。
|
|
18
|
+
- **Perspectives 视图页 sidebar 显示扁平 fallback 列表**(用户反馈不够有用)→ 视图页自动 frontmatter `sidebar: false`,只剩中间 graph/stats/tags 组件全屏展示。
|
|
19
|
+
|
|
20
|
+
### Added(0.3.0-beta.0 → 0.3.0)
|
|
21
|
+
- 11 篇 EN 翻译文档(`en/guide/{overview, docs×6, advanced×4}`)
|
|
22
|
+
- VitePress 原生 i18n 集成:wrapper 自动识别 `themeConfig.locales`,给每个 non-root locale 用 `includePrefix` 生成独立 sidebar
|
|
23
|
+
- `sidebarAuto.includePrefix` / `excludePrefixes` 公开选项
|
|
8
24
|
|
|
9
25
|
## [0.3.0-beta.1] - 2026-05-20
|
|
10
26
|
|
package/dist/index.cjs
CHANGED
|
@@ -570,7 +570,7 @@ function computeUrl(rel, options) {
|
|
|
570
570
|
const pathPart = isIndex ? noExt.replace(/(^|\/)(index|README)$/i, "$1") : noExt;
|
|
571
571
|
const segments = pathPart.split("/").filter(Boolean);
|
|
572
572
|
if (segments.length === 0) {
|
|
573
|
-
return
|
|
573
|
+
return "/";
|
|
574
574
|
}
|
|
575
575
|
const last = segments[segments.length - 1];
|
|
576
576
|
if (!isIndex) {
|
|
@@ -578,7 +578,7 @@ function computeUrl(rel, options) {
|
|
|
578
578
|
} else if (!options.cleanUrls) {
|
|
579
579
|
segments.push("index.html");
|
|
580
580
|
}
|
|
581
|
-
return buildUrl(
|
|
581
|
+
return buildUrl("/", segments);
|
|
582
582
|
}
|
|
583
583
|
function pushToArrayMap(m, k, v) {
|
|
584
584
|
const arr = m.get(k);
|
|
@@ -2067,6 +2067,7 @@ function renderTemplate(v) {
|
|
|
2067
2067
|
"---",
|
|
2068
2068
|
`title: ${v.title}`,
|
|
2069
2069
|
"layout: doc",
|
|
2070
|
+
"sidebar: false",
|
|
2070
2071
|
"aside: false",
|
|
2071
2072
|
"outline: false",
|
|
2072
2073
|
"---",
|
|
@@ -2938,8 +2939,12 @@ function toPerFolderSidebar(root, opts, options, index) {
|
|
|
2938
2939
|
/* isTopLevel */
|
|
2939
2940
|
true
|
|
2940
2941
|
)) {
|
|
2941
|
-
const firstUrl = child.dirIndex && !child.dirIndexEmpty ? child.dirIndex.url : findFirstPageUrl(child, opts)
|
|
2942
|
-
|
|
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
|
+
}
|
|
2943
2948
|
} else {
|
|
2944
2949
|
rootItems.push({ text: labelText });
|
|
2945
2950
|
}
|
|
@@ -2994,10 +2999,12 @@ function generateNav(index, options, autoOptions = {}) {
|
|
|
2994
2999
|
}
|
|
2995
3000
|
const text = computeGroupText(child.path, child.dirIndex, opts);
|
|
2996
3001
|
let link;
|
|
2997
|
-
if (child.dirIndex) {
|
|
3002
|
+
if (child.dirIndex && !child.dirIndexEmpty) {
|
|
2998
3003
|
link = stripBase(child.dirIndex.url, base);
|
|
2999
3004
|
} else {
|
|
3000
|
-
|
|
3005
|
+
const first = findFirstPageUrl(child, opts);
|
|
3006
|
+
if (!first) continue;
|
|
3007
|
+
link = first;
|
|
3001
3008
|
}
|
|
3002
3009
|
const escapedPrefix = `/${key}/`.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3003
3010
|
out.push({ text, link, activeMatch: "^" + escapedPrefix });
|