mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
5dd3eaabee
Among the various changes, most instances of {{ template "partials/FILE.html" . }} were changed to {{ partial "FILE.html" . }} Also, in main.go, change "2013" to "2013-14".
831 B
831 B
date | menu | next | prev | title | weight | ||||
---|---|---|---|---|---|---|---|---|---|
2013-07-09 |
|
/extras/urls | /extras/highlighting | Table of Contents | 60 |
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" . }}