@rspress/shared 2.0.0-beta.24 → 2.0.0-beta.25
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.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/node-utils.d.ts +1 -1
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -740,7 +740,7 @@ export declare interface SocialLink {
|
|
|
740
740
|
content: string;
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
export declare type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | {
|
|
743
|
+
export declare type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | 'npm' | {
|
|
744
744
|
svg: string;
|
|
745
745
|
};
|
|
746
746
|
|
package/dist/index.js
CHANGED
|
@@ -151,8 +151,11 @@ function normalizeHref(url, cleanUrls = false) {
|
|
|
151
151
|
if (cleanUrls) {
|
|
152
152
|
if (cleanUrl.endsWith('.html')) cleanUrl = cleanUrl.replace(/\.html$/, '');
|
|
153
153
|
if (cleanUrls && cleanUrl.endsWith('/index')) cleanUrl = cleanUrl.replace(/\/index$/, '/');
|
|
154
|
-
} else
|
|
155
|
-
|
|
154
|
+
} else {
|
|
155
|
+
const hasExt = /\.[a-zA-Z]\w*$/.test(cleanUrl);
|
|
156
|
+
if (!hasExt) if (cleanUrl.endsWith('/')) cleanUrl += 'index.html';
|
|
157
|
+
else cleanUrl += '.html';
|
|
158
|
+
}
|
|
156
159
|
return addLeadingSlash(hash ? `${cleanUrl}#${hash}` : cleanUrl);
|
|
157
160
|
}
|
|
158
161
|
function withoutLang(path, langs) {
|
package/dist/node-utils.d.ts
CHANGED
|
@@ -569,7 +569,7 @@ declare interface SocialLink {
|
|
|
569
569
|
content: string;
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
-
declare type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | {
|
|
572
|
+
declare type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | 'npm' | {
|
|
573
573
|
svg: string;
|
|
574
574
|
};
|
|
575
575
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/shared",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.25",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rsbuild/core": "~1.4.
|
|
35
|
+
"@rsbuild/core": "~1.4.13",
|
|
36
36
|
"@shikijs/rehype": "^3.8.1",
|
|
37
37
|
"gray-matter": "4.0.3",
|
|
38
38
|
"lodash-es": "^4.17.21",
|
|
39
39
|
"unified": "^11.0.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@rslib/core": "0.11.
|
|
42
|
+
"@rslib/core": "0.11.1",
|
|
43
43
|
"@types/jest": "~29.5.14",
|
|
44
44
|
"@types/lodash-es": "^4.17.12",
|
|
45
45
|
"@types/node": "^22.8.1",
|
|
46
|
-
"@types/react": "^19.1.
|
|
46
|
+
"@types/react": "^19.1.9",
|
|
47
47
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
48
48
|
"medium-zoom": "1.1.0",
|
|
49
49
|
"rimraf": "^6.0.1",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public",
|
|
55
|
-
"provenance": true,
|
|
56
55
|
"registry": "https://registry.npmjs.org/"
|
|
57
56
|
},
|
|
58
57
|
"scripts": {
|