vitepress 0.20.9 → 0.20.10
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
|
@@ -40087,7 +40087,7 @@ async function renderPage(config, page, result, appChunk, cssChunk, pageToHashMa
|
|
|
40087
40087
|
${stylesheetLink}
|
|
40088
40088
|
${preloadLinksString}
|
|
40089
40089
|
${prefetchLinkString}
|
|
40090
|
-
${renderHead(head)}
|
|
40090
|
+
${await renderHead(head)}
|
|
40091
40091
|
</head>
|
|
40092
40092
|
<body>
|
|
40093
40093
|
<div id="app">${content}</div>
|
|
@@ -40111,14 +40111,19 @@ function resolvePageImports(config, page, result, appChunk) {
|
|
|
40111
40111
|
];
|
|
40112
40112
|
}
|
|
40113
40113
|
function renderHead(head) {
|
|
40114
|
-
return head.map(([tag, attrs = {}, innerHTML = ""]) => {
|
|
40114
|
+
return Promise.all(head.map(async ([tag, attrs = {}, innerHTML = ""]) => {
|
|
40115
40115
|
const openTag = `<${tag}${renderAttrs(attrs)}>`;
|
|
40116
40116
|
if (tag !== "link" && tag !== "meta") {
|
|
40117
|
+
if (tag === "script") {
|
|
40118
|
+
innerHTML = (await vite.transformWithEsbuild(innerHTML, "inline-script.js", {
|
|
40119
|
+
minify: true
|
|
40120
|
+
})).code.trim();
|
|
40121
|
+
}
|
|
40117
40122
|
return `${openTag}${innerHTML}</${tag}>`;
|
|
40118
40123
|
} else {
|
|
40119
40124
|
return openTag;
|
|
40120
40125
|
}
|
|
40121
|
-
}).join("\n
|
|
40126
|
+
})).then((tags) => tags.join("\n "));
|
|
40122
40127
|
}
|
|
40123
40128
|
function renderAttrs(attrs) {
|
|
40124
40129
|
return Object.keys(attrs).map((key) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.10",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -131,5 +131,6 @@
|
|
|
131
131
|
"docs-build": "npm run build && node ./bin/vitepress build docs",
|
|
132
132
|
"docs-serve": "node ./bin/vitepress serve docs",
|
|
133
133
|
"ci-docs": "run-s build docs-build"
|
|
134
|
-
}
|
|
134
|
+
},
|
|
135
|
+
"readme": "# (WIP) VitePress 📝💨\n\n[](https://github.com/vuejs/vitepress/actions)\n[](https://www.npmjs.com/package/vitepress)\n\n---\n\nVitePress is [VuePress](http://vuepress.vuejs.org/)' spiritual successor, built on top of [vite](https://github.com/vuejs/vite).\n\n## Documentation\n\nTo check out docs, visit [vitepress.vuejs.org](https://vitepress.vuejs.org).\n\n## Changelog\n\nDetailed changes for each release are documented in the [CHANGELOG](https://github.com/vuejs/vitepress/blob/master/CHANGELOG.md).\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](./.github/contributing.md) before making a pull request.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2019-present, Yuxi (Evan) You\n"
|
|
135
136
|
}
|