From e74d1b8607e35c8185fccb93e2d350075acc3650 Mon Sep 17 00:00:00 2001 From: spf13 Date: Thu, 20 Feb 2014 19:04:08 -0500 Subject: [PATCH] Adding documentation on Table of Contents functionality --- docs/content/extras/toc.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/content/extras/toc.md diff --git a/docs/content/extras/toc.md b/docs/content/extras/toc.md new file mode 100644 index 000000000..1ca12b1ac --- /dev/null +++ b/docs/content/extras/toc.md @@ -0,0 +1,33 @@ +--- +title: "Table of Contents" +date: "2013-07-09" +groups: ["extras"] +groups_weight: 70 +--- + +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). + + {{ template "chrome/header.html" . }} +
+ {{ .TableOfContents }} +
+

{{ .Title }}

+ {{ .Content }} + {{ template "chrome/footer.html" . }} + +