Skip to content

Commit 9b6dce6

Browse files
committed
Add markdown-it-task-lists
1 parent cae108d commit 9b6dce6

File tree

3 files changed

+29
-238
lines changed

3 files changed

+29
-238
lines changed

.eleventy.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
let markdownIt = require('markdown-it');
2+
let taskLists = require('markdown-it-task-lists');
3+
4+
let markdownItOptions = {
5+
breaks: true,
6+
html: true,
7+
linkify: true,
8+
typographer: true
9+
};
10+
11+
let md = markdownIt(markdownItOptions).use(taskLists, { label: true });
12+
113
module.exports = function(config) {
214
config.addCollection('writing', (collection) => {
315
return [
@@ -7,6 +19,8 @@ module.exports = function(config) {
719

820
config.addPassthroughCopy('./src/img');
921
config.addPassthroughCopy('./src/styles');
22+
23+
config.setLibrary('md', md);
1024

1125
return {
1226
dir: {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"license": "MIT",
88
"private": true,
99
"devDependencies": {
10-
"@11ty/eleventy": "^0.10.0"
10+
"@11ty/eleventy": "^0.10.0",
11+
"markdown-it-task-lists": "^2.1.1"
1112
},
1213
"scripts": {
1314
"build": "ELEVENTY_ENV=production yarn eleventy",

0 commit comments

Comments
 (0)