Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't support checkbox in markdown #986

Closed
1 task
zhuiyue132 opened this issue Nov 7, 2018 · 8 comments
Closed
1 task

doesn't support checkbox in markdown #986

zhuiyue132 opened this issue Nov 7, 2018 · 8 comments

Comments

@zhuiyue132
Copy link

zhuiyue132 commented Nov 7, 2018

  • I confirm that this is a issue rather than a question.

Bug report

Version

Steps to reproduce

What is expected?

What is actually happening?

Other relevant information

  • Your OS:
  • Node.js version:
  • Browser version:
  • Is this a global or local install?
  • Which package manager did you use for the install?
@0w0k
Copy link

0w0k commented Nov 7, 2018

@0w0k
Copy link

0w0k commented Nov 7, 2018

module.exports = {
  markdown: {
    config: md => {
      md.use(require('markdown-it-task-lists'))
    }
  }
}

@0w0k
Copy link

0w0k commented Nov 7, 2018

@ulivz Close this issue 😎

@ulivz ulivz closed this as completed Nov 7, 2018
@meision
Copy link

meision commented Nov 12, 2018

This is not exactly same with https://blog.github.com/2014-04-28-task-lists-in-all-markdown-documents/
add follow css in override.styl to remove leading dots.

.contains-task-list LI
{
list-style-type:none;
}

@maartenvanderhoef
Copy link

As per 1.0, extendMarkdown

module.exports = {
  markdown: {
    extendMarkdown: md => {
      md.use(require('markdown-it-task-lists'))
    }
  }
}

.vuepress/styles/index.styl

.contains-task-list LI
{
list-style-type:none;
}

@iszmxw
Copy link

iszmxw commented Nov 16, 2020

As per 1.0, extendMarkdown

module.exports = {
  markdown: {
    extendMarkdown: md => {
      md.use(require('markdown-it-task-lists'))
    }
  }
}

.vuepress/styles/index.styl

.contains-task-list LI
{
list-style-type:none;
}

感谢,成功解决问题

@justforuse
Copy link

For your information, if you are using vuepress-next, the config file should be:

module.exports = {
	// ...
	extendsMarkdown: md => {
	  md.use(require('markdown-it-task-lists'))
	}
}

@sweihub
Copy link

sweihub commented Jan 4, 2023

Thanks for the answer by @maartenvanderhoef, to clarify for newbie, the complete steps for VuePress 1.x + tasklists

  1. Install markdown-it-task-lists
npm install markdown-it-task-lists
  1. Edit src/.vuepress/config.js, add the markdown node
module.exports = {
  markdown: {
    extendMarkdown: md => {
      md.use(require('markdown-it-task-lists'))
    }
  }
}
  1. Remove the dot before tasks, edit file .vuepress/styles/index.styl
.contains-task-list LI {
list-style-type:none;
}
  1. Restart the VuePress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants