Install Eleventy ToC plug-in

This commit is contained in:
Helen Chong 2024-04-12 01:15:27 +08:00
parent f66945a85a
commit 8e6d55f68f
3 changed files with 3 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -4,6 +4,7 @@ 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 anchors_plugin = require('@orchidjs/eleventy-plugin-ids'); const anchors_plugin = require('@orchidjs/eleventy-plugin-ids');
const pluginTOC = require('eleventy-plugin-toc');
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
// Copy files // Copy files
@ -21,6 +22,7 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(anchors_plugin, { eleventyConfig.addPlugin(anchors_plugin, {
selectors: ['h2','h3','h4','h5','h6'], selectors: ['h2','h3','h4','h5','h6'],
}); });
eleventyConfig.addPlugin(pluginTOC);
return { return {
dir: { dir: {

View File

@ -17,6 +17,7 @@
"@11ty/eleventy-plugin-webc": "^0.11.2", "@11ty/eleventy-plugin-webc": "^0.11.2",
"@orchidjs/eleventy-plugin-ids": "^0.1.1", "@orchidjs/eleventy-plugin-ids": "^0.1.1",
"eleventy-plugin-metagen": "^1.8.3", "eleventy-plugin-metagen": "^1.8.3",
"eleventy-plugin-toc": "^1.1.5",
"install": "^0.13.0" "install": "^0.13.0"
} }
} }