forked from nyancrimew/maia.crimew.gay
make headings linkable
This commit is contained in:
parent
e43a1a7b56
commit
5f44add927
3 changed files with 41 additions and 2 deletions
|
@ -4,6 +4,8 @@ const timeToRead = require('eleventy-plugin-time-to-read');
|
|||
const safeLinks = require('@sardine/eleventy-plugin-external-links');
|
||||
const eleventySass = require("@11tyrocks/eleventy-plugin-sass-lightningcss");
|
||||
const related = require("eleventy-plugin-related");
|
||||
const markdownIt = require("markdown-it");
|
||||
const markdownItAnchor = require("markdown-it-anchor");
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
const parseDate = (str) => {
|
||||
|
@ -21,6 +23,8 @@ module.exports = function (eleventyConfig) {
|
|||
trimBlocks: true
|
||||
});
|
||||
|
||||
eleventyConfig.setLibrary("md", markdownIt({ "html": true }).use(markdownItAnchor, { "level": 2 }));
|
||||
|
||||
eleventyConfig.addPlugin(pluginRss);
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
eleventyConfig.addPlugin(timeToRead);
|
||||
|
|
35
package-lock.json
generated
35
package-lock.json
generated
|
@ -14,7 +14,9 @@
|
|||
"@11tyrocks/eleventy-plugin-sass-lightningcss": "^1.0.3",
|
||||
"@sardine/eleventy-plugin-external-links": "^1.4.0",
|
||||
"eleventy-plugin-related": "^1.0.6",
|
||||
"eleventy-plugin-time-to-read": "^1.3.0"
|
||||
"eleventy-plugin-time-to-read": "^1.3.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@11ty/dependency-tree": {
|
||||
|
@ -404,6 +406,28 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/linkify-it": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz",
|
||||
"integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/markdown-it": {
|
||||
"version": "12.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz",
|
||||
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/linkify-it": "*",
|
||||
"@types/mdurl": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mdurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz",
|
||||
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
||||
|
@ -1816,6 +1840,15 @@
|
|||
"markdown-it": "bin/markdown-it.js"
|
||||
}
|
||||
},
|
||||
"node_modules/markdown-it-anchor": {
|
||||
"version": "8.6.7",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz",
|
||||
"integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==",
|
||||
"peerDependencies": {
|
||||
"@types/markdown-it": "*",
|
||||
"markdown-it": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/markdown-it/node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
"@11tyrocks/eleventy-plugin-sass-lightningcss": "^1.0.3",
|
||||
"@sardine/eleventy-plugin-external-links": "^1.4.0",
|
||||
"eleventy-plugin-related": "^1.0.6",
|
||||
"eleventy-plugin-time-to-read": "^1.3.0"
|
||||
"eleventy-plugin-time-to-read": "^1.3.0",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue