GFM 支持任务列表:
https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments
如何在 Jekyll 页面中使用它?在我网站的 _config.yml
# Build settings
markdown: kramdown
kramdown:
input: GFM
hard_wrap: false
这适用于大多数其他 GFM 构造。但不适用于任务列表。
Markdown 示例:
#### Checklist for Aggregations
- [ ] Always add `max(x)` in the group for size of buckets needed. When data is distributed across multiple content nodes this result can be inaccurate. To increase accuracy we need to use `precision(x)` as well to tune accuracy as we need.
预期:
最佳答案
您使用的是哪个版本的 kramdown?自 1.16.0 起支持 GFM 任务列表(在 1.16.1 中发布了错误修复)。要消除项目符号列表,list-style-type: none
is necessary .
在我的系统上,以下测试文件
---
---
- [ ] Unchecked
- [x] Checked
{: style='list-style-type: none'}
生成预期的
使用 kramdown 1.16.2 和 Jekyll 3.6.2。如果您的 kramdown 早于 1.16.1,您应该能够简单地
$ gem update kramdown
获得该功能。
关于jekyll - 如何在 Jekyll 中添加 GFM 任务列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47788154/