Skip to content

1.0.0-rc.154 更新说明

约 320 字大约 1 分钟

破坏性更新

2025-06-19

在本次更新中,主题移除了 vuepress-plugin-md-enhance 插件。

由该插件提供支持的 图表 Chartjs ECharts mermaid flowchart plantuml 功能,迁移到 @vuepress/plugin-markdown-chart 插件。

因此主题也同步完成了插件的迁移。

至此,在主题中,由 vuepress-plugin-md-enhance 插件提供的相关功能,已全部迁移至官方 vuepress/ecosystem 仓库的相关插件。因此主题将从 1.0.0-rc.154 开始,安全的移除 vuepress-plugin-md-enhance 插件。

受此影响,如果你在 .vuepress/client.ts 中,有使用从 vuepress-plugin-md-enhance 导入的功能:

.vuepress/client.ts
import { defineMermaidConfig } from 'vuepress-plugin-md-enhance/client'

defineMermaidConfig({
  theme: 'dark'
})

需要进行修改:

.vuepress/client.ts
import { defineMermaidConfig } from '@vuepress/plugin-markdown-chart/client'
import { defineMermaidConfig } from 'vuepress-plugin-md-enhance/client'

defineMermaidConfig({
  theme: 'dark'
})

如果您有在 .vuepress/config.ts 的主题配置中,使用 plugins.mdEnhance 配置,需要进行修改:

.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'

export default defineUserConfig({
  theme: plumeTheme({
    plugins: {
      mdEnhance: {
        mermaid: true,
        chartjs: true,
        // ...
      }
    }
  })
})

需要进行修改:

.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'

export default defineUserConfig({
  theme: plumeTheme({
    plugins: {
      mdEnhance: { 
        mermaid: true,
        chartjs: true,
        // ...
      }
    },
    markdown: { 
      mermaid: true,
      chartjs: true,
      // ...
    }
  })
})

如果您在使用过程中遇到问题,请在 GitHub Issue 上反馈。

贡献者

更新日志

2025/6/19 10:48
查看所有更新日志
  • 33833-feat!: use new chart plugin and remove md-enhance (#621)