mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 13:54:43 -04:00
Add TODO list support for Blackfriday
* Add CSS class to TODO list and list items * Add a flag to turn task list support off Fixes #2269
This commit is contained in:
parent
e8e325b1af
commit
b9fc7ed0c3
49
content/content/markdown-extras.md
Normal file
49
content/content/markdown-extras.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
aliases:
|
||||||
|
- /doc/supported-formats/
|
||||||
|
lastmod: 2016-07-22
|
||||||
|
date: 2016-07-22
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
parent: content
|
||||||
|
prev: /content/summaries
|
||||||
|
next: /content/example
|
||||||
|
title: Markdown Extras
|
||||||
|
weight: 66
|
||||||
|
toc: false
|
||||||
|
---
|
||||||
|
|
||||||
|
Hugo provides some convenient markdown extensions.
|
||||||
|
|
||||||
|
## Task lists
|
||||||
|
|
||||||
|
Hugo supports GitHub styled task lists (TODO lists) for the Blackfriday renderer (md-files). See [Blackfriday config](/overview/configuration/#configure-blackfriday-rendering) for how to turn it off.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
- [ ] a task list item
|
||||||
|
- [ ] list syntax required
|
||||||
|
- [ ] incomplete
|
||||||
|
- [x] completed
|
||||||
|
```
|
||||||
|
|
||||||
|
Renders as:
|
||||||
|
|
||||||
|
- [ ] a task list item
|
||||||
|
- [ ] list syntax required
|
||||||
|
- [ ] incomplete
|
||||||
|
- [x] completed
|
||||||
|
|
||||||
|
|
||||||
|
And produces this HTML:
|
||||||
|
|
||||||
|
```html
|
||||||
|
|
||||||
|
<ul class="task-list">
|
||||||
|
<li><input type="checkbox" disabled="" class="task-list-item"> a task list item</li>
|
||||||
|
<li><input type="checkbox" disabled="" class="task-list-item"> list syntax required</li>
|
||||||
|
<li><input type="checkbox" disabled="" class="task-list-item"> incomplete</li>
|
||||||
|
<li><input type="checkbox" checked="" disabled="" class="task-list-item"> completed</li>
|
||||||
|
</ul>
|
||||||
|
```
|
@ -4,9 +4,9 @@ date: 2013-07-01
|
|||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
parent: content
|
parent: content
|
||||||
next: /content/example
|
|
||||||
notoc: true
|
notoc: true
|
||||||
prev: /content/ordering
|
prev: /content/ordering
|
||||||
|
next: /content/markdown-extras
|
||||||
title: Summaries
|
title: Summaries
|
||||||
weight: 65
|
weight: 65
|
||||||
---
|
---
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
aliases:
|
aliases:
|
||||||
- /doc/configuration/
|
- /doc/configuration/
|
||||||
lastmod: 2015-12-08
|
lastmod: 2016-07-22
|
||||||
date: 2013-07-01
|
date: 2013-07-01
|
||||||
linktitle: Configuration
|
linktitle: Configuration
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
parent: getting started
|
parent: getting started
|
||||||
next: /overview/source-directory
|
next: /overview/source-directory
|
||||||
notoc: true
|
toc: true
|
||||||
prev: /overview/usage
|
prev: /overview/usage
|
||||||
title: Configuring Hugo
|
title: Configuring Hugo
|
||||||
weight: 40
|
weight: 40
|
||||||
@ -195,6 +195,18 @@ But Hugo does expose some options---as listed in the table below, matched with t
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><code><strong>taskLists</strong></code></td>
|
||||||
|
<td><code>true</code></td>
|
||||||
|
<td><code></code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="purpose-title">Purpose:</td>
|
||||||
|
<td class="purpose-description" colspan="2">Turn off GitHub styled automatic task/TODO list generation.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><code><strong>smartypants</strong></code></td>
|
<td><code><strong>smartypants</strong></code></td>
|
||||||
<td><code>true</code></td>
|
<td><code>true</code></td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user