@sugarat/theme 0.1.33 → 0.1.34
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/node.d.ts +1 -0
- package/node.js +7 -1
- package/package.json +1 -1
- package/src/composables/config/index.ts +1 -0
- package/src/node.ts +9 -1
package/node.d.ts
CHANGED
package/node.js
CHANGED
|
@@ -353,6 +353,9 @@ function getThemeConfig(cfg) {
|
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
+
if (cfg) {
|
|
357
|
+
cfg.mermaid = cfg?.mermaid ?? false;
|
|
358
|
+
}
|
|
356
359
|
if (cfg?.mermaid !== false) {
|
|
357
360
|
extraConfig.vite = {
|
|
358
361
|
...extraConfig.vite,
|
|
@@ -447,7 +450,10 @@ function defineConfig(config) {
|
|
|
447
450
|
}, 1200);
|
|
448
451
|
}
|
|
449
452
|
const extendThemeConfig = config.extends?.themeConfig?.blog;
|
|
450
|
-
const resultConfig = extendThemeConfig.mermaid === false ? config : (0, import_vitepress_plugin_mermaid.withMermaid)({
|
|
453
|
+
const resultConfig = extendThemeConfig.mermaid === false ? config : (0, import_vitepress_plugin_mermaid.withMermaid)({
|
|
454
|
+
...config,
|
|
455
|
+
mermaid: extendThemeConfig.mermaid === true ? {} : extendThemeConfig.mermaid
|
|
456
|
+
});
|
|
451
457
|
if (!resultConfig.markdown)
|
|
452
458
|
resultConfig.markdown = {};
|
|
453
459
|
if (config.extends?.markdown?.config) {
|
package/package.json
CHANGED
package/src/node.ts
CHANGED
|
@@ -178,6 +178,10 @@ export function getThemeConfig(cfg?: Partial<Theme.BlogConfig>) {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
+
if (cfg) {
|
|
182
|
+
cfg.mermaid = cfg?.mermaid ?? false
|
|
183
|
+
}
|
|
184
|
+
|
|
181
185
|
// 流程图支持
|
|
182
186
|
if (cfg?.mermaid !== false) {
|
|
183
187
|
extraConfig.vite = {
|
|
@@ -329,7 +333,11 @@ export function defineConfig(config: UserConfig<Theme.Config>) {
|
|
|
329
333
|
const resultConfig =
|
|
330
334
|
extendThemeConfig.mermaid === false
|
|
331
335
|
? config
|
|
332
|
-
: withMermaid({
|
|
336
|
+
: withMermaid({
|
|
337
|
+
...config,
|
|
338
|
+
mermaid:
|
|
339
|
+
extendThemeConfig.mermaid === true ? {} : extendThemeConfig.mermaid
|
|
340
|
+
})
|
|
333
341
|
|
|
334
342
|
// 处理markdown插件
|
|
335
343
|
if (!resultConfig.markdown) resultConfig.markdown = {}
|