hugo/docs/content/extras/toc.md
Austin Ziegler fd33e5d202 Documentation for ref and relref.
- Rejigged the weight of the extras/ content for the new crossreferences
  page.
- Used the new {{</*…*/>}} format for documenting highlighting and to
  prevent a warning about the missing `fig` shortcode.
2014-12-18 22:18:37 -05:00

832 B

date menu next prev title weight
2013-07-09
main
parent
extras
/extras/urls /extras/highlighting Table of Contents 100

Hugo will automatically parse the Markdown for your content and create a Table of Contents you can use to guide readers to the sections within your content.

Usage

Simply create content like you normally would with the appropriate headers.

Hugo will take this Markdown and create a table of contents stored in the content variable .TableOfContents

Template Example

This is example code of a single.html template.

{{ partial "header.html" . }}
    <div id="toc" class="well col-md-4 col-sm-6">
    {{ .TableOfContents }}
    </div>
    <h1>{{ .Title }}</h1>
    {{ .Content }}
{{ partial "footer.html" . }}