Install Table of Contents (nesting) Eleventy Plugin
This commit is contained in:
parent
11fe9b7e23
commit
6224c16da7
|
@ -3,6 +3,7 @@ const { EleventyRenderPlugin } = require("@11ty/eleventy");
|
||||||
const pluginWebc = require("@11ty/eleventy-plugin-webc");
|
const pluginWebc = require("@11ty/eleventy-plugin-webc");
|
||||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||||
const metagen = require('eleventy-plugin-metagen');
|
const metagen = require('eleventy-plugin-metagen');
|
||||||
|
const pluginTOC = require('eleventy-plugin-nesting-toc');
|
||||||
|
|
||||||
module.exports = function (eleventyConfig) {
|
module.exports = function (eleventyConfig) {
|
||||||
// Copy files
|
// Copy files
|
||||||
|
@ -17,6 +18,7 @@ module.exports = function (eleventyConfig) {
|
||||||
});
|
});
|
||||||
eleventyConfig.addPlugin(pluginRss);
|
eleventyConfig.addPlugin(pluginRss);
|
||||||
eleventyConfig.addPlugin(metagen);
|
eleventyConfig.addPlugin(metagen);
|
||||||
|
eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3', 'h4', 'h5'] });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||||
"@11ty/eleventy-plugin-webc": "^0.11.2",
|
"@11ty/eleventy-plugin-webc": "^0.11.2",
|
||||||
"eleventy-plugin-metagen": "^1.8.3",
|
"eleventy-plugin-metagen": "^1.8.3",
|
||||||
|
"eleventy-plugin-nesting-toc": "^1.3.0",
|
||||||
"install": "^0.13.0"
|
"install": "^0.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue