mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-26 11:38:15 +08:00
23 lines
614 B
TypeScript
23 lines
614 B
TypeScript
import type { Plugin } from '@vuepress/core'
|
|
import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance'
|
|
import type { PlumeThemePluginOptions } from '../../shared'
|
|
|
|
export const resolveMarkdownEnhance = (
|
|
plugins: PlumeThemePluginOptions
|
|
): Plugin => {
|
|
if (plugins.markdownEnhance === false) return [] as unknown as Plugin
|
|
return mdEnhancePlugin(
|
|
Object.assign(
|
|
{
|
|
container: true, // info note tip warning danger details
|
|
codegroup: true,
|
|
align: true,
|
|
mark: true,
|
|
tasklist: true,
|
|
demo: true,
|
|
},
|
|
plugins.markdownEnhance || {}
|
|
)
|
|
)
|
|
}
|