File tree Expand file tree Collapse file tree 3 files changed +29
-238
lines changed Expand file tree Collapse file tree 3 files changed +29
-238
lines changed Original file line number Diff line number Diff line change
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
+
1
13
module . exports = function ( config ) {
2
14
config . addCollection ( 'writing' , ( collection ) => {
3
15
return [
@@ -7,6 +19,8 @@ module.exports = function(config) {
7
19
8
20
config . addPassthroughCopy ( './src/img' ) ;
9
21
config . addPassthroughCopy ( './src/styles' ) ;
22
+
23
+ config . setLibrary ( 'md' , md ) ;
10
24
11
25
return {
12
26
dir : {
Original file line number Diff line number Diff line change 7
7
"license" : " MIT" ,
8
8
"private" : true ,
9
9
"devDependencies" : {
10
- "@11ty/eleventy" : " ^0.10.0"
10
+ "@11ty/eleventy" : " ^0.10.0" ,
11
+ "markdown-it-task-lists" : " ^2.1.1"
11
12
},
12
13
"scripts" : {
13
14
"build" : " ELEVENTY_ENV=production yarn eleventy" ,
You can’t perform that action at this time.
0 commit comments