From 667e11c4ec3835d959aab1797647bd0a49869674 Mon Sep 17 00:00:00 2001 From: etienne Date: Tue, 21 Oct 2014 23:35:24 +0200 Subject: Init commit --- content/extras/toc.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 content/extras/toc.md (limited to 'content/extras/toc.md') diff --git a/content/extras/toc.md b/content/extras/toc.md new file mode 100644 index 0000000..68376e1 --- /dev/null +++ b/content/extras/toc.md @@ -0,0 +1,37 @@ +--- +date: 2013-07-09 +menu: + main: + parent: extras +next: /extras/urls +prev: /extras/highlighting +title: Table of Contents +weight: 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](/layout/variables) `.TableOfContents` + + +## Template Example + +This is example code of a [single.html template](/layout/content). + + {{ partial "header.html" . }} +
+ {{ .TableOfContents }} +
+

{{ .Title }}

+ {{ .Content }} + {{ partial "footer.html" . }} + + -- cgit v1.3