Skip to main content

Task list

Less than 1 minuteMarkdownMarkdownTask List

Let the Markdown file in your VuePress site support task list.

Settings

TS
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";

export default defineUserConfig({
  theme: hopeTheme({
    plugins: {
      mdEnhance: {
        tasklist: true,
      },
    },
  }),
});







 
 
 


Syntax

  • Use - [ ] some text to render an unchecked task item.
  • Use - [x] some text to render a checked task item. (Capital X 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;
}