vuepress-theme-uniapp-official 1.4.13 → 1.4.15
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/index.js +17 -1
- package/package.json +2 -2
- package/styles/custom-block.styl +9 -8
package/index.js
CHANGED
|
@@ -49,6 +49,21 @@ module.exports = (themeConfig, ctx, pluginAPI) => {
|
|
|
49
49
|
md.use(require('markdown-it-raw-table'));
|
|
50
50
|
})
|
|
51
51
|
|
|
52
|
+
const originalShouldPrefetch = ctx.siteConfig.shouldPrefetch || function () { return false }
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param {string} path path: js 资源文件路径
|
|
56
|
+
* @param {string} type type: 资源文件类型,取值有 script 等
|
|
57
|
+
* @returns {boolean}
|
|
58
|
+
*/
|
|
59
|
+
ctx.siteConfig.shouldPrefetch = function (path, type) {
|
|
60
|
+
let themeShouldPrefetch = true
|
|
61
|
+
if (type === 'script') themeShouldPrefetch = path.includes('vendors~') || path.includes('layout-') || path.includes('index.')
|
|
62
|
+
else { themeShouldPrefetch = false }
|
|
63
|
+
return originalShouldPrefetch.call(this, path, type) || themeShouldPrefetch
|
|
64
|
+
}
|
|
65
|
+
ctx.siteConfig.patterns = ctx.siteConfig.patterns || ['**/!(_sidebar).md', '**/*.vue']
|
|
66
|
+
|
|
52
67
|
const klass = 'info'
|
|
53
68
|
const config = {
|
|
54
69
|
extend: '@vuepress/theme-default',
|
|
@@ -140,7 +155,8 @@ module.exports = (themeConfig, ctx, pluginAPI) => {
|
|
|
140
155
|
if (configPluginIndex !== -1 && Array.isArray(item)) {
|
|
141
156
|
const configPlugin = config.plugins[configPluginIndex]
|
|
142
157
|
if (Array.isArray(configPlugin) && typeof item[1] !== 'undefined') {
|
|
143
|
-
|
|
158
|
+
if (item[1] === false) configPlugin[1] = false
|
|
159
|
+
else { configPlugin[1] = Object.assign({}, configPlugin[1], item[1]) }
|
|
144
160
|
} else {
|
|
145
161
|
config.plugins[configPluginIndex] = item
|
|
146
162
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-theme-uniapp-official",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.15",
|
|
4
4
|
"description": "uni-app official website theme for vuepress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"algoliasearch": "^4.13.1",
|
|
40
40
|
"clipboard": "^2.0.11",
|
|
41
41
|
"vuepress-plugin-check-md2": "^1.0.5",
|
|
42
|
-
"vuepress-plugin-expandable-row": "^1.0.
|
|
42
|
+
"vuepress-plugin-expandable-row": "^1.0.6",
|
|
43
43
|
"vuepress-plugin-juejin-style-copy": "^1.0.4",
|
|
44
44
|
"vuepress-plugin-mermaidjs": "1.9.1",
|
|
45
45
|
"vuepress-plugin-named-chunks": "^1.1.4",
|
package/styles/custom-block.styl
CHANGED
|
@@ -195,9 +195,10 @@
|
|
|
195
195
|
color: var(--vt-c-text-1);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.custom-block.warning a{
|
|
198
|
+
/* .custom-block.warning a{
|
|
199
199
|
color $textColor
|
|
200
200
|
}
|
|
201
|
+
*/
|
|
201
202
|
|
|
202
203
|
.custom-block.danger {
|
|
203
204
|
background-color: var(--vt-c-bg-soft);
|
|
@@ -209,9 +210,9 @@
|
|
|
209
210
|
color: var(--vt-c-text-1);
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
.custom-block.danger a{
|
|
213
|
+
/* .custom-block.danger a{
|
|
213
214
|
color $textColor
|
|
214
|
-
}
|
|
215
|
+
} */
|
|
215
216
|
|
|
216
217
|
.custom-block.details {
|
|
217
218
|
display block
|
|
@@ -229,13 +230,13 @@
|
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
.custom-block.details figure:last-child{
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
margin-bottom 0
|
|
234
|
+
padding-bottom 0
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
.custom-block.details p:last-child{
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
margin-bottom 0
|
|
239
|
+
padding-bottom 0
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
.custom-block.details summary {
|
|
@@ -332,5 +333,5 @@
|
|
|
332
333
|
|
|
333
334
|
.custom-block.danger a,
|
|
334
335
|
.custom-block.warning a {
|
|
335
|
-
color:
|
|
336
|
+
color: $accentColor;
|
|
336
337
|
}
|