From b9fc7ed0c31801d50efaf460d7d96b97ba2f7b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 9 Sep 2016 13:08:20 +0200 Subject: [PATCH] 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 --- content/content/markdown-extras.md | 49 ++++++++++++++++++++++++++++++ content/content/summaries.md | 2 +- content/overview/configuration.md | 16 ++++++++-- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 content/content/markdown-extras.md diff --git a/content/content/markdown-extras.md b/content/content/markdown-extras.md new file mode 100644 index 000000000..ef7f57f31 --- /dev/null +++ b/content/content/markdown-extras.md @@ -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 + + +``` diff --git a/content/content/summaries.md b/content/content/summaries.md index 208bb96e5..6353f4c25 100644 --- a/content/content/summaries.md +++ b/content/content/summaries.md @@ -4,9 +4,9 @@ date: 2013-07-01 menu: main: parent: content -next: /content/example notoc: true prev: /content/ordering +next: /content/markdown-extras title: Summaries weight: 65 --- diff --git a/content/overview/configuration.md b/content/overview/configuration.md index 8127c5823..849e4ed45 100644 --- a/content/overview/configuration.md +++ b/content/overview/configuration.md @@ -1,14 +1,14 @@ --- aliases: - /doc/configuration/ -lastmod: 2015-12-08 +lastmod: 2016-07-22 date: 2013-07-01 linktitle: Configuration menu: main: parent: getting started next: /overview/source-directory -notoc: true +toc: true prev: /overview/usage title: Configuring Hugo weight: 40 @@ -195,6 +195,18 @@ But Hugo does expose some options---as listed in the table below, matched with t + + +taskLists +true + + + +Purpose: +Turn off GitHub styled automatic task/TODO list generation. + + + smartypants true