Skip to content

Commit

Permalink
Merge pull request #241 from ATQQ/bugfix/mermaid-build-error
Browse files Browse the repository at this point in the history
fix: mermaid build error
  • Loading branch information
ATQQ authored Jun 8, 2024
2 parents e57e428 + 9912490 commit 7f917af
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 7 deletions.
7 changes: 7 additions & 0 deletions packages/blogpress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ publish: false

# CHANGELOG

## 2.0.49
### Patch Changes

- Updated dependencies
- @sugarat/theme@0.4.1

## 2.0.48

### Patch Changes

- Updated dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/blogpress/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "blogpress",
"type": "module",
"version": "2.0.48",
"version": "2.0.49",
"private": true,
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sugarat/create-theme",
"version": "0.0.62",
"version": "0.0.63",
"description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
"author": "粥里有勺糖",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-theme/public/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@sugarat/theme": "^0.4.0",
"@sugarat/theme": "^0.4.1",
"element-plus": "^2.7.2",
"vue": "3.4.26"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/theme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @sugarat/theme

## 0.4.1

### Patch Changes

- fix: mermaid build error

## 0.4.0

### Minor Changes
Expand Down
8 changes: 7 additions & 1 deletion packages/theme/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 更新日志
description: 最近更新(v0.4.0) ⏰ 2024/06/08:构建优化,显著减少使用主题后增加的耗时,支持自定义友链和标签标题,一系列问题修复。
description: 最近更新(v0.4.1) ⏰ 2024/06/08:构建优化,显著减少使用主题后增加的耗时,支持自定义友链和标签标题,一系列问题修复。
author: 粥里有勺糖
top: 2
tag: 日志
Expand All @@ -27,6 +27,12 @@ bun install vitepress@latest
```
:::

## 0.4.1 (2024/06/08)

### Patch Changes

- fix: mermaid build error

## 0.4.0 (2024/06/08)

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sugarat/theme",
"version": "0.4.0",
"version": "0.4.1",
"description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
"author": "sugar",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions packages/theme/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export function getThemeConfig(cfg: Partial<Theme.BlogConfig> = {}) {
// 配置校验
checkConfig(cfg)

// 默认不开启 markdown 图表,会明显影响构建速度
cfg.mermaid = cfg.mermaid ?? false

// 文章数据
const pagesData: Theme.PageData[] = []
const extraVPConfig: any = {
Expand All @@ -34,8 +37,6 @@ export function getThemeConfig(cfg: Partial<Theme.BlogConfig> = {}) {
registerMdPlugins(extraVPConfig, markdownPlugin)

// patch extraVPConfig
// 默认不开启 markdown 图表,会明显影响构建速度
cfg.mermaid = cfg.mermaid ?? false
if (cfg?.mermaid !== false) {
patchMermaidPluginCfg(extraVPConfig)
}
Expand Down

0 comments on commit 7f917af

Please sign in to comment.