vitepress 0.21.0 → 0.21.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/dist/node/cli.js
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -36611,7 +36611,11 @@ function createVitePressPlugin(root, siteConfig, ssr = false, pageToHashMap, cli
|
|
|
36611
36611
|
},
|
|
36612
36612
|
load(id) {
|
|
36613
36613
|
if (id === SITE_DATA_REQUEST_PATH) {
|
|
36614
|
-
|
|
36614
|
+
let data = siteData;
|
|
36615
|
+
if (config.command === "build") {
|
|
36616
|
+
data = __spreadProps$1(__spreadValues$1({}, siteData), { head: [] });
|
|
36617
|
+
}
|
|
36618
|
+
return `export default ${JSON.stringify(JSON.stringify(data))}`;
|
|
36615
36619
|
}
|
|
36616
36620
|
},
|
|
36617
36621
|
transform(code, id) {
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
package/types/shared.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
export { DefaultTheme } from './default-theme'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
title
|
|
8
|
-
description
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export interface PageData {
|
|
6
|
+
relativePath: string
|
|
7
|
+
title: string
|
|
8
|
+
description: string
|
|
9
|
+
headers: Header[]
|
|
10
|
+
frontmatter: Record<string, any>
|
|
11
|
+
lastUpdated: number
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface SiteData<ThemeConfig = any> {
|
|
@@ -49,17 +49,17 @@ export type HeadConfig =
|
|
|
49
49
|
| [string, Record<string, string>]
|
|
50
50
|
| [string, Record<string, string>, string]
|
|
51
51
|
|
|
52
|
-
export interface PageData {
|
|
53
|
-
relativePath: string
|
|
54
|
-
title: string
|
|
55
|
-
description: string
|
|
56
|
-
headers: Header[]
|
|
57
|
-
frontmatter: Record<string, any>
|
|
58
|
-
lastUpdated: number
|
|
59
|
-
}
|
|
60
|
-
|
|
61
52
|
export interface Header {
|
|
62
53
|
level: number
|
|
63
54
|
title: string
|
|
64
55
|
slug: string
|
|
65
56
|
}
|
|
57
|
+
|
|
58
|
+
export interface LocaleConfig {
|
|
59
|
+
lang: string
|
|
60
|
+
title?: string
|
|
61
|
+
description?: string
|
|
62
|
+
head?: HeadConfig[]
|
|
63
|
+
label?: string
|
|
64
|
+
selectText?: string
|
|
65
|
+
}
|