kaapiandcode / hugo-goa

Simple Minimalistic Theme for Hugo
https://kaapiandcode.github.io/hugo-goa-demo/
MIT License
264 stars 128 forks source link

How do I disable to insert Table of Contents automatically #75

Closed owlinux1000 closed 4 years ago

owlinux1000 commented 4 years ago

The problem article and git repository of its is here. Sorry written in Japanese. But it is no matter. https://alicemacs.com/blog/predict_lcg/ https://github.com/owlinux1000/blog

I don't want to insert Table of Contents. But, This is automatically inserted. How do I disable it.

connor11528 commented 4 years ago

@owlinux1000 you can set toc = false in your config.toml file.

You can see it being rendered in content.html:

  <div class="col-md-12 text-justify content">
    {{ if and ( ne .Params.toc false) (gt .WordCount 300 ) }}
    {{ .TableOfContents }}
    {{ end }}
    {{ .Content }}
  </div>
jsigee87 commented 4 years ago

@connor11528 do you have any more insight here? Having the same issue where an auto-generated TOC is being generated, but is rendered incorrectly and so I would like to disable it. Adding toc = false to the config.toml did not resolve it.

connor11528 commented 4 years ago

@jsigee87 put toc: false in your blog post too. Here's an example file: https://raw.githubusercontent.com/connor11528/connorleech.info/master/content/blog/2-Types-of-Software-Engineering-Interviews.md

jsigee87 commented 4 years ago

Awesome that was what I was missing. Thanks!

owlinux1000 commented 4 years ago

@connor11528 Thanks a lot!! I resolved this issue!