Skip to content

Commit

Permalink
Minor toc bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JedHazaymeh committed Feb 8, 2024
1 parent 5930732 commit ea158b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(navigationRenderPlugin)
eleventyConfig.addPlugin(tocPlugin, {
tags: ['h2', 'h3', 'h4'],
wrapperClass: 'menu',
ul: true,
})

eleventyConfig.addFilter('slugify', slugify)
Expand Down
10 changes: 2 additions & 8 deletions src/_includes/markdown.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ outline: On this page
</article>
</main>
<aside class="sticky hidden md:block right-0 top-16 h-screen p-5 overflow-auto bg-base-100">
<nav class="menu">
<li>
<header class="menu-title">{{ outline }}</header>
<ul>
{{ content | toc | safe }}
</ul>
</li>
</nav>
<header class="menu-title">{{ outline }}</header>
{{ content | toc | safe }}
</aside>
</div>

0 comments on commit ea158b3

Please sign in to comment.