nanxstats / hugo-renga

A Bootstrap-based minimalist theme for Hugo/blogdown.
https://nanx.me/hugo-renga/
MIT License
23 stars 3 forks source link

Table of contents not working #4

Closed kaustabpal closed 4 years ago

kaustabpal commented 4 years ago

I am using this theme and want to create a table of contents. I have edited my single.html and this is what it looks like

{{ define "main" }}
    {{ partial "header" . }}

    <div class="content">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-sm-12 col-md-10">
                    <h1 class="mx-0 mx-md-4">{{ .Title }}</h1>
                    <div class="markdown">
                        {{ partial "content" . }}
            {{ if .Params.toc }}
                {{ .TableOfContents }}
            {{ end }}
                    </div>
                </div>
            </div>
        </div>
    </div>

    {{ partial "footer" . }}
{{ end }}

However the table of contents is not showing for the articles. Please help.