@vuepress/core 2.0.0-rc.8 → 2.0.0-rc.9
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/dist/index.js +7 -14
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var preparePageComponent = async (app, page) => {
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
// src/app/prepare/prepareRoutes.ts
|
|
57
|
-
import {
|
|
57
|
+
import { normalizeRoutePath } from "@vuepress/shared";
|
|
58
58
|
var HMR_CODE2 = `
|
|
59
59
|
if (import.meta.webpackHot) {
|
|
60
60
|
import.meta.webpackHot.accept()
|
|
@@ -73,11 +73,7 @@ if (import.meta.hot) {
|
|
|
73
73
|
})
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
76
|
-
var resolvePageRedirects = ({
|
|
77
|
-
path: path9,
|
|
78
|
-
pathInferred,
|
|
79
|
-
filePathRelative
|
|
80
|
-
}) => {
|
|
76
|
+
var resolvePageRedirects = ({ path: path9, pathInferred }) => {
|
|
81
77
|
const redirectsSet = /* @__PURE__ */ new Set();
|
|
82
78
|
const addRedirect = (redirect) => {
|
|
83
79
|
const normalizedPath = normalizeRoutePath(redirect);
|
|
@@ -89,10 +85,7 @@ var resolvePageRedirects = ({
|
|
|
89
85
|
redirectsSet.add(redirect);
|
|
90
86
|
};
|
|
91
87
|
if (pathInferred !== null) {
|
|
92
|
-
addRedirect(pathInferred);
|
|
93
|
-
}
|
|
94
|
-
if (filePathRelative !== null) {
|
|
95
|
-
addRedirect(ensureLeadingSlash(filePathRelative));
|
|
88
|
+
addRedirect(encodeURI(pathInferred));
|
|
96
89
|
}
|
|
97
90
|
return Array.from(redirectsSet);
|
|
98
91
|
};
|
|
@@ -164,7 +157,7 @@ var resolveAppMarkdown = async (app) => {
|
|
|
164
157
|
import { debug as debug2, globby } from "@vuepress/utils";
|
|
165
158
|
|
|
166
159
|
// src/page/inferPagePath.ts
|
|
167
|
-
import { ensureLeadingSlash
|
|
160
|
+
import { ensureLeadingSlash, resolveLocalePath } from "@vuepress/shared";
|
|
168
161
|
var inferPagePath = ({
|
|
169
162
|
app,
|
|
170
163
|
filePathRelative
|
|
@@ -175,7 +168,7 @@ var inferPagePath = ({
|
|
|
175
168
|
pathLocale: "/"
|
|
176
169
|
};
|
|
177
170
|
}
|
|
178
|
-
const pathInferred =
|
|
171
|
+
const pathInferred = ensureLeadingSlash(filePathRelative).replace(/\.md$/, ".html").replace(/\/(README|index).html$/i, "/");
|
|
179
172
|
const pathLocale = resolveLocalePath(app.siteData.locales, pathInferred);
|
|
180
173
|
return {
|
|
181
174
|
pathInferred,
|
|
@@ -404,7 +397,7 @@ var resolvePagePath = ({
|
|
|
404
397
|
};
|
|
405
398
|
|
|
406
399
|
// src/page/resolvePagePermalink.ts
|
|
407
|
-
import { ensureLeadingSlash as
|
|
400
|
+
import { ensureLeadingSlash as ensureLeadingSlash2, isString as isString3 } from "@vuepress/shared";
|
|
408
401
|
import { path as path5 } from "@vuepress/utils";
|
|
409
402
|
var resolvePagePermalink = ({
|
|
410
403
|
app,
|
|
@@ -426,7 +419,7 @@ var resolvePagePermalink = ({
|
|
|
426
419
|
pathLocale,
|
|
427
420
|
permalinkPattern.replace(/:year/, year).replace(/:month/, month).replace(/:day/, day).replace(/:slug/, slug).replace(/:raw/, pathInferred?.replace(/^\//, "") ?? "")
|
|
428
421
|
);
|
|
429
|
-
return
|
|
422
|
+
return ensureLeadingSlash2(link);
|
|
430
423
|
};
|
|
431
424
|
var getPermalinkPattern = ({
|
|
432
425
|
app,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.9",
|
|
4
4
|
"description": "Core package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"vue": "^3.4.
|
|
31
|
-
"@vuepress/client": "2.0.0-rc.
|
|
32
|
-
"@vuepress/markdown": "2.0.0-rc.
|
|
33
|
-
"@vuepress/shared": "2.0.0-rc.
|
|
34
|
-
"@vuepress/utils": "2.0.0-rc.
|
|
30
|
+
"vue": "^3.4.21",
|
|
31
|
+
"@vuepress/client": "2.0.0-rc.9",
|
|
32
|
+
"@vuepress/markdown": "2.0.0-rc.9",
|
|
33
|
+
"@vuepress/shared": "2.0.0-rc.9",
|
|
34
|
+
"@vuepress/utils": "2.0.0-rc.9"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|