* feat(theme)!: migrate `plugin-markdown-hint` * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * chore: tweak * fix(theme): improve `home-blog` styles in mobile, close #210 * chore: tweak * chore: tweak * chore: tweak * feat: add support optional icon for `file-tree` and `code-tabs` * chore: tweak * chore: tweak * chore: tweak * chore: tweak
2.4 KiB
2.4 KiB
title, author, createTime, permalink
| title | author | createTime | permalink |
|---|---|---|---|
| Markdown Enhance | pengzhanbo | 2024/03/06 20:25:36 | /config/plugins/markdown-enhance/ |
概述
提供 Markdown 增强功能。
关联插件:vuepress-plugin-md-enhance
默认配置:
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
plugins: {
markdownEnhance: {
align: true, // 对齐容器
mark: true, // 标记语法
tasklist: true, // 任务列表语法
attrs: true, // 属性语法
sup: true, // 上标语法
sub: true, // 下标语法
footnote: true, // 注脚语法
// 以下可选项在 主题中默认不启用,
// 请在主题中自行配置
// include: true, // Markdown 导入支持
// chart: true, // 图表支持
// echarts: true, // ECharts 图表支持
// flowchart: true, // 流程图支持
// markmap: true, // Markmap 图表支持
// stylize: true, // 对行内语法进行样式化以创建代码片段
// playground: true, // 交互演示
// kotlinPlayground: true, // Kotlin 交互演示
// vuePlayground: true, // Vue 交互演示
// sandpack: true, // sandpack 交互演示
// demo: true, // 代码案例
}
}
}),
})
配置
:::tip 说明 主题还未完全对 该插件提供的 所有 增强功能 进行 样式上的适配。 如果你在使用过程中遇到样式上的问题,可以在 issue 里提出。 :::
::: warning
该插件从 2.0.0-rc.53 开始,移除了部分功能。主题从 1.0.0-rc.103 版本开始,适配至最新版。
由此带来的影响是,plugins.mdEnhance 中 imgSize/imgLazyload/imgMark/figure/obsidianImgSize/katex/mathjax/tabs/code-tabs/hint/alerts弃用。
imgSize/imgLazyload/imgMark/figure/obsidianImgSize所实现的功能,您可以使用plugins.markdownImage重新进行配置。katex/mathjax所实现的功能,您可以使用plugins.markdownMath进行配置。tabs/code-tabs/hint/alerts已变更为 主题的内置功能,您无需额外的配置。 :::