support table of contents for Markdown posts

This commit is contained in:
Yihui Xie
2017-06-22 22:33:39 -05:00
parent 6b05e21804
commit b2e8d8212a
3 changed files with 9 additions and 0 deletions

View File

@@ -5,6 +5,10 @@
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
</div>
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}
<main>
{{ .Content }}
</main>