From a8b3e1537fad9a9d803b7f81eed9ed4459d0bd9c Mon Sep 17 00:00:00 2001 From: Nick Sabine Date: Fri, 9 Aug 2013 00:10:35 -0400 Subject: [PATCH] Added examples to indexes.md --- docs/content/doc/indexes.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/content/doc/indexes.md b/docs/content/doc/indexes.md index de9bb78ad..9731a7739 100644 --- a/docs/content/doc/indexes.md +++ b/docs/content/doc/indexes.md @@ -117,6 +117,17 @@ each content piece are located in the usual place {{ end }} +If you wish to display the list of all indexes, the index can +be retrieved from the `.Site` variable. + +#### Example + + + ## Creating Indexes of Indexes Hugo also supports creating pages that list your values for each @@ -181,3 +192,30 @@ that the data structure of the two is different. **.Data.Index** The Alphabetical index
**.Data.OrderedIndex** The popular index
+## Creating a menu based on indexes + +Hugo can generate menus based on indexes by iterating and +nesting the index keys. This can be used to build a hierarchy +of content within your site. + +To have hugo create the menu, simply create a template in chome +called menu.html, then include it using the +`{{ template "chrome/menu.html" . }}` syntax. + + +#### Example menu.html file + + +