Mark all headers with an id

This commit is contained in:
Ole Eskild Steensen 2022-03-23 13:22:11 +01:00
parent 0b2060fe99
commit 95701eec3d
3 changed files with 63 additions and 1 deletions

View File

@ -10,6 +10,7 @@ module.exports = function(eleventyConfig) {
html: true
})
.use(require("markdown-it-footnote"))
.use(require('markdown-it-named-headings'))
.use(require('markdown-it-task-checkbox'), {
disabled: true,
divWrap: false,
@ -143,4 +144,4 @@ module.exports = function(eleventyConfig) {
passthroughFileCopy: true,
};
};
};

60
package-lock.json generated
View File

@ -18,6 +18,7 @@
"gray-matter": "^4.0.3",
"markdown-it": "^12.3.2",
"markdown-it-footnote": "^3.0.3",
"markdown-it-named-headings": "^1.1.0",
"markdown-it-task-checkbox": "^1.0.6"
},
"devDependencies": {
@ -3266,6 +3267,20 @@
"integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=",
"dev": true
},
"node_modules/lodash.kebabcase": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.0.1.tgz",
"integrity": "sha1-XmO8mqKlVi/zuXynry+APeG8uQ4=",
"dependencies": {
"lodash.deburr": "^4.0.0",
"lodash.words": "^4.0.0"
}
},
"node_modules/lodash.words": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-4.2.0.tgz",
"integrity": "sha1-Xs/q+Oz4rKqODIOGKV8Zk8nPQDY="
},
"node_modules/lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@ -3305,6 +3320,15 @@
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"node_modules/markdown-it-named-headings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/markdown-it-named-headings/-/markdown-it-named-headings-1.1.0.tgz",
"integrity": "sha1-L2zSmADeHp3eCiTo1NEnXfQuoX0=",
"dependencies": {
"lodash.kebabcase": "4.0.1",
"unidecode": "^0.1.8"
}
},
"node_modules/markdown-it-task-checkbox": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/markdown-it-task-checkbox/-/markdown-it-task-checkbox-1.0.6.tgz",
@ -5803,6 +5827,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/unidecode": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/unidecode/-/unidecode-0.1.8.tgz",
"integrity": "sha1-77swFTi8RSRqmsjFWdcvAVMFBT4=",
"engines": {
"node": ">= 0.4.12"
}
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
@ -8716,6 +8748,20 @@
"integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=",
"dev": true
},
"lodash.kebabcase": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.0.1.tgz",
"integrity": "sha1-XmO8mqKlVi/zuXynry+APeG8uQ4=",
"requires": {
"lodash.deburr": "^4.0.0",
"lodash.words": "^4.0.0"
}
},
"lodash.words": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-4.2.0.tgz",
"integrity": "sha1-Xs/q+Oz4rKqODIOGKV8Zk8nPQDY="
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
@ -8761,6 +8807,15 @@
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
},
"markdown-it-named-headings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/markdown-it-named-headings/-/markdown-it-named-headings-1.1.0.tgz",
"integrity": "sha1-L2zSmADeHp3eCiTo1NEnXfQuoX0=",
"requires": {
"lodash.kebabcase": "4.0.1",
"unidecode": "^0.1.8"
}
},
"markdown-it-task-checkbox": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/markdown-it-task-checkbox/-/markdown-it-task-checkbox-1.0.6.tgz",
@ -10727,6 +10782,11 @@
"which-boxed-primitive": "^1.0.2"
}
},
"unidecode": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/unidecode/-/unidecode-0.1.8.tgz",
"integrity": "sha1-77swFTi8RSRqmsjFWdcvAVMFBT4="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",

View File

@ -30,6 +30,7 @@
"gray-matter": "^4.0.3",
"markdown-it": "^12.3.2",
"markdown-it-footnote": "^3.0.3",
"markdown-it-named-headings": "^1.1.0",
"markdown-it-task-checkbox": "^1.0.6"
}
}