Task list
Less than 1 minute
Let the Markdown file in your VuePress site support task list.
Settings
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";
export default {
plugins: [
mdEnhancePlugin({
// Enable Task List
tasklist: true,
}),
],
};
Syntax
- Use
- [ ] some text
to render an unchecked task item. - Use
- [x] some text
to render a checked task item. (CapitalX
is also supported)
Demo
- [ ] Plan A
- [x] Plan B
Advanced
Besides setting tasklist: true
in the plugin options, you can also pass objects to it as options. The available options are as follows:
interface TaskListOptions {
/**
* Whether disable checkbox
*
* @default true
*/
disabled?: boolean;
/**
* Whether use `<label>` to wrap text
*
* @default true
*/
label?: boolean;
}