001_Adding a markdown-it plugin to vuepress
Background
While writing the tables for the automatic control theory notes I wanted to merge some cells, but plain Markdown has no way to handle complicated tables.
How to go about it
First I went looking for a vuepress plugin that could handle it, and found none. Then someone pointed out that vuepress uses markdown-it as the parser for markdown, and that parser has an extension mechanism. So I turned to looking for an extension under markdown-it that could support the operation.
The solution
Use the markdown-it-multimd-table plugin to enhance how markdown renders tables. Bring it in like this:
Run
pnpm i -D markdown-it-multimd-tableto download the pluginmarkdown-it-multimd-tableImport the plugin in
.vuepress/config.ts:import Multimd_table from 'markdown-it-multimd-table'Add an
extendsMarkdownhook to the export to wire it in:export default defineUserConfig({ ... extendsMarkdown: (md) => { md.use(Multimd_table) } })
And then you can use it.
Important
This article was translated by Hermes Agent; the original text can be found at here. The translation is for reference only. Translation time: 2026-11-05
