enable toc
Closed this issue · 2 comments
While browsing your example site I noticed that your post have all a right hand side table of content displayed.
I checked the raw markdown of your example site but did not find anything related to the toc.
in the layout/partial/toc.html
I could find the code which displays the toc yet I do not understand why on my side this is not active.
The `config.toml does not specify anything in relation with the table of content either. Anything I am missing?
Based on the line of code {{ if and (gt .WordCount 80) (.Params.toc | default true) }}, I've set up to only generate a TOC when an article is longer than 80 words. By default, Hugo looks for h2 and h3 headings in your Markdown file to generate the TOC. So, in order to generate a TOC, two conditions need to be met: 1) the article needs to be longer than 80 words, and 2) your Markdown file needs to include ## or ### headings.
Absolutely, feel free to ask if there's anything you're still unsure about. I'm here to help!
Thanks for the heads up. I tried it on the about category there I guess it is not active. Will see in the next post.