diff --git a/eleventy.config.js b/eleventy.config.js index f680196..04325ea 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -28,7 +28,9 @@ module.exports = function (eleventyConfig) { }); eleventyConfig.amendLibrary("md", mdLib => mdLib .use(mdDefList) - .use(mdToc) + .use(mdToc, { + includeLevel: [ 1, 2, 3, 4, 5, 6 ] + }) .use(mdAnchor)); eleventyConfig.addFilter("IsNotPage", (collection, url) => diff --git a/src/css/Components/_table-of-contents.scss b/src/css/Components/_table-of-contents.scss new file mode 100644 index 0000000..540247d --- /dev/null +++ b/src/css/Components/_table-of-contents.scss @@ -0,0 +1,10 @@ +@use '_variables'; + +.table-of-contents { + padding-left: 0.5em; + padding-right: 1em; + border: 1px solid var(--primary-border-color); + border-radius: var(--main-border-radius); + + text-transform: capitalize; +} diff --git a/src/css/site.scss b/src/css/site.scss index fdfd2bb..882e465 100644 --- a/src/css/site.scss +++ b/src/css/site.scss @@ -12,3 +12,4 @@ @use 'Components/_lists'; @use 'Components/_code'; @use 'Components/_posts'; +@use 'Components/_table-of-contents';