Implementing new menu system in the docs site
authorspf13 <steve.francia@gmail.com>
Wed, 23 Apr 2014 07:00:11 +0000 (03:00 -0400)
committerspf13 <steve.francia@gmail.com>
Wed, 23 Apr 2014 07:00:11 +0000 (03:00 -0400)
46 files changed:
docs/content/community/contributing.md
docs/content/community/contributors.md
docs/content/community/mailing-list.md
docs/content/community/press.md
docs/content/content/example.md
docs/content/content/front-matter.md
docs/content/content/ordering.md
docs/content/content/organization.md
docs/content/content/sections.md
docs/content/content/types.md
docs/content/extras/aliases.md
docs/content/extras/highlighting.md
docs/content/extras/permalinks.md
docs/content/extras/shortcodes.md
docs/content/extras/toc.md
docs/content/extras/urls.md
docs/content/indexes/displaying.md
docs/content/indexes/lists.md
docs/content/indexes/ordering.md
docs/content/indexes/overview.md
docs/content/indexes/templates.md
docs/content/layout/404.html [deleted file]
docs/content/layout/404.md [new file with mode: 0644]
docs/content/layout/chrome.md
docs/content/layout/content.md
docs/content/layout/functions.md
docs/content/layout/go-templates.md
docs/content/layout/homepage.md
docs/content/layout/indexes.md
docs/content/layout/rss.md
docs/content/layout/templates.md
docs/content/layout/variables.md
docs/content/layout/views.md
docs/content/meta/license.md
docs/content/meta/release-notes.md
docs/content/meta/roadmap.md
docs/content/overview/configuration.md
docs/content/overview/installing.md
docs/content/overview/introduction.md
docs/content/overview/quickstart.md
docs/content/overview/source-directory.md
docs/content/overview/usage.md
docs/content/tutorials/github_pages_blog.md
docs/content/tutorials/mathjax.md
docs/content/tutorials/migrate-from-jekyll.md
docs/layouts/chrome/menu.html

index 1de03b48db0f689684f242a0b144de423fc0f2f5..909c4447151499d4f8351429ac17b38a7b4b5cf9 100644 (file)
@@ -2,8 +2,10 @@
 title: "Contributing to Hugo"
 date: "2013-07-01"
 aliases: ["/doc/contributing/", "/meta/contributing/"]
-groups: ["community"]
-groups_weight: 30
+weight: 30
+menu:
+  main:
+    parent: 'community'
 ---
 
 We welcome all contributions. Feel free to pick something from the roadmap
index 1cc8b0cf4f2ff39b90f59d65a1caf30f29ada2d6..316c35d7afb7aa804073849bf7b923594b8b34e5 100644 (file)
@@ -2,9 +2,11 @@
 title: "Contributors"
 date: "2013-07-01"
 aliases: ["/doc/contributors/", "/meta/contributors/"]
-groups: ["community"]
-groups_weight: 40
+weight: 40
 notoc: true
+menu:
+  main:
+    parent: 'community'
 ---
 
 Hugo was built with love and Go by:
index c3867b856359de333100138859eccb90b0f98ae0..6a9dc813fd397739c96a27e1ea0ef72f3561317f 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Mailing List"
 date: "2013-07-01"
-groups: ["community"]
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'community'
 ---
 
 Hugo has two mailing lists:
index ac2beba4e4795f55cfa67275e5465bc7caedcec9..c778e4e9c93959d65cb253e4bb44890dcda9f880 100644 (file)
@@ -2,9 +2,10 @@
 title = "Press, Blogs and Media Coverage"
 date = 2014-03-24T20:00:00Z 
 linktitle = "Press"
-groups = ["community"]
-groups_weight = 20
+weight = 20
 notoc = true
+[menu.main]
+    parent = "community"
 +++
 
 Hugo has been featured in the following Blog Posts, Press and Media.
index b012cd67df38d9b0ff83baf124c37ea42d6036df..03487f4c5f8c1ad94187245eb8ab78b883490554 100644 (file)
@@ -3,8 +3,10 @@ title: "Example Content File"
 date: "2013-07-01"
 aliases: ["/doc/example/"]
 linktitle: "Example"
-groups: ['content']
-groups_weight: 50
+menu:
+    main:
+        parent: 'content'
+weight: 50
 notoc: true
 ---
 
index 22b0a40df0c9de2670c823aea5bc876206b4402b..fd600f72046afdccfb0871c236152fb8232af492 100644 (file)
@@ -2,8 +2,10 @@
 title = "Front Matter"
 date = "2013-07-01"
 aliases = ["/doc/front-matter/"]
-groups = ["content"]
-groups_weight = 40
+weight = 40
+
+[menu.main]
+    parent = "content"
 +++
 
 The front matter is one of the features that gives Hugo its strength. It enables
index 844ff73d07415a728e0ba66a19e563b8f2d423aa..93a66441d93ce6ec4745f35c31c3415928c69365 100644 (file)
@@ -2,8 +2,10 @@
 title: "Ordering Content"
 date: "2014-03-06"
 linktitle: "Ordering"
-groups: ['content']
-groups_weight: 60
+menu:
+  main:
+    parent: "content"
+weight: 60
 ---
 
 In Hugo you have a good degree of control of how your content can be ordered.
index 61ea0a0a477f71d80f2b3918925df2fd017a7e56..832edc5573e7d7890b89bf24e787fe71071299ca 100644 (file)
@@ -3,8 +3,10 @@ title: "Content Organization"
 date: "2013-07-01"
 aliases: ["/doc/organization/"]
 linktitle: "Organization"
-groups: ['content']
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'content'
 ---
 
 Hugo uses markdown files with headers commonly called the front matter. Hugo respects the organization
index dfda7f27e5eb49879fc3e0836ceb05bb3a2bbd5d..ea9d75dd49c09925351a43a0fec6937b57670f3b 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Sections"
 date: "2013-07-01"
-groups: ['content']
-groups_weight: 20
+menu:
+    main:
+        parent: 'content'
+weight: 20
 notoc: true
 ---
 
index adc7919f4d929e4de391de70a97922c90a1bb891..72291d43ac6a5f78e0d1fe360fae8a04eda49685 100644 (file)
@@ -2,8 +2,10 @@
 title: "Content Types"
 date: "2013-07-01"
 linktitle: "Types"
-groups: ['content']
-groups_weight: 30
+menu:
+    main:
+        parent: 'content'
+weight: 30
 ---
 
 Hugo has full support for multiple content types each with its own set
index fc1390ba794a9846f3bcbcb5e770620052ea40ba..f96740018b569605a7e16f338db7d7c2a5c17bef 100644 (file)
@@ -5,8 +5,10 @@ aliases:
     - /doc/redirects/
     - /doc/alias/
     - /doc/aliases/
-groups: ["extras"]
-groups_weight: 20
+weight: 20
+menu:
+  main:
+    parent: 'extras'
 ---
 
 For people migrating existing published content to Hugo theres a good chance
index 743e69ff270a71d5839e9593b1d95af6de4948b5..845d5643789ea051556e07905a5c3e431ada1b17 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Highlighting"
 date: "2013-07-01"
-groups: ["extras"]
-groups_weight: 15
+weight: 15
+menu:
+  main:
+    parent: 'extras'
 ---
 
 Hugo provides the ability for you to highlight source code from within your
index 08e7f3e2dc7bc4656e1f4185503bbf2d14666fe8..e36fb9d307dedbecef67ed0826ace0eb9a547892 100644 (file)
@@ -3,9 +3,11 @@ title: "Permalinks"
 date: "2013-11-18"
 aliases:
   - "/doc/permalinks/"
-groups: ["extras"]
-groups_weight: 30
+weight: 30
 notoc: true
+menu:
+  main:
+    parent: 'extras'
 ---
 
 By default, content is laid out into the target `publishdir` (public)
index 7e2c548c77a96da9a8665f4429f52403be0c9e4c..fa26f4d0a3766180c90036b776143830dcb5956c 100644 (file)
@@ -2,8 +2,10 @@
 title: "Shortcodes"
 date: "2013-07-01"
 aliases: ["/doc/shortcodes/"]
-groups: ["extras"]
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'extras'
 ---
 
 Because Hugo uses markdown for its simple content format, however there's a lot
index 1ca12b1ac83df639cec6cf57ca940103ac13ed52..3b0b1a84defebe76eff74d14d4c187702f395c01 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Table of Contents"
 date: "2013-07-09"
-groups: ["extras"]
-groups_weight: 70
+weight: 70
+menu:
+  main:
+    parent: 'extras'
 ---
 
 Hugo will automatically parse the markdown for your content and create
index 87dce974a5e401bbff80d70893e4c5a78ab64f77..87d91b07da1c91c2a8ff6b84ef6fc7e49dd132bc 100644 (file)
@@ -3,9 +3,11 @@ title: "URLs"
 date: "2014-01-03"
 aliases:
   - "/doc/urls/"
-groups: ["extras"]
-groups_weight: 40
+weight: 40
 notoc: true
+menu:
+  main:
+    parent: 'extras'
 ---
 
 ## Pretty Urls
index 88596e9959c790746ed4950b766296e8d5496747..2d2d2b712b0981071e4769f90cbf69b73c3c828d 100644 (file)
@@ -1,9 +1,12 @@
 ---
-title:  "Rendering Indexes"
+title:  "Rendering Taxonomies"
 date: "2013-07-01"
 linktitle: "Displaying"
-groups: ["indexes"]
-groups_weight: 20
+aliases: ["/indexes/displaying/"]
+weight: 20
+menu:
+  main:
+    parent: 'taxonomy'
 ---
 
 ## Rendering index values assigned to this content
index d5d9449acfac11ea0c3d825665d942bbba01238a..4a2607f3204ce64fb8a2405d8fa5be517e1e659d 100644 (file)
@@ -1,10 +1,12 @@
 ---
-title: "Index Lists"
+title: "Taxonomy Lists"
 date: "2013-07-01"
-aliases: ["/doc/indexes/", "/extras/indexes"]
+aliases: ["/indexes/lists/","/doc/indexes/", "/extras/indexes"]
 linktitle: "Lists"
-groups: ["indexes"]
-groups_weight: 40
+weight: 40
+menu:
+  main:
+    parent: 'taxonomy'
 ---
 
 An index list is a list of all the keys that are contained in the index. When a
index 6311e68d83e0d118267d83ef5ffcd3d79a13ee82..80fae56dd44a91186ac5448869c7d612d13d8595 100644 (file)
@@ -1,9 +1,12 @@
 ---
-title: "Ordering Indexes"
+title: "Ordering Taxonomies"
 date: "2013-07-01"
 linktitle: "Ordering"
-groups: ["indexes"]
-groups_weight: 60
+aliases: ["/indexes/ordering/"]
+weight: 60
+menu:
+  main:
+    parent: 'taxonomy'
 ---
 
 Hugo provides the ability to both:
index 43543a3e28bf428170ac21f43fee7c117b0f8686..4c579821d2870463adf05d11b667f36a7ae18c79 100644 (file)
@@ -1,10 +1,11 @@
 ---
-title: "Indexes"
+title: "Taxonomy Overview"
 date: "2013-07-01"
-aliases: ["/doc/indexes/", "/extras/indexes"]
-linktitle: "Overview"
-groups: ["indexes"]
-groups_weight: 10
+aliases: ["/indexes/overview/","/doc/indexes/", "/extras/indexes"]
+weight: 10
+menu:
+  main:
+    parent: 'taxonomy'
 ---
 
 Hugo includes support for user defined groupings of content called indexes.
index 6181efb44a6c560df4dfca311df911e32d2e4c60..ed02b7a95835fb7feee5d50b11c8c5e9a2216b70 100644 (file)
@@ -1,9 +1,12 @@
 ---
-title: "Index Templates"
+title: "Taxonomy Templates"
 date: "2013-07-01"
 linktitle: "Templates"
-groups: ["indexes"]
-groups_weight: 30
+aliases: ["/indexes/templates/"]
+weight: 30
+menu:
+  main:
+    parent: 'taxonomy'
 ---
 
 There are two different templates that the use of indexes will require you to provide.
diff --git a/docs/content/layout/404.html b/docs/content/layout/404.html
deleted file mode 100644 (file)
index 9d54e0d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
----
-title: "404.html Templates"
-date: "2013-08-21"
----
-
-When using Hugo with [github pages](http://pages.github.com/) you can provide
-your own 404 template by creating a 404.html file in the root.
-
-404 pages are of the type "node" and have all the [node
-variables](/layout/variables/) available to use in the templates.
-
-In addition to the standard node variables, the homepage has access to
-all site content accessible from .Data.Pages
-
-    â–¾ layouts/
-        404.html
-
-## 404.html
-This is a basic example of a 404.html template:
-
-    {{ template "chrome/header.html" . }}
-    {{ template "chrome/subheader.html" . }}
-
-    <section id="main">
-      <div>
-       <h1 id="title">{{ .Title }}</h1>
-      </div>
-    </section>
-
-    {{ template "chrome/footer.html" }}
-
diff --git a/docs/content/layout/404.md b/docs/content/layout/404.md
new file mode 100644 (file)
index 0000000..f2e62a5
--- /dev/null
@@ -0,0 +1,35 @@
+---
+title: "404.html Templates"
+date: "2013-08-21"
+notoc: true
+menu:
+  main:
+    parent: 'layout'
+---
+
+When using Hugo with [github pages](http://pages.github.com/) you can provide
+your own 404 template by creating a 404.html file in the root.
+
+404 pages are of the type "node" and have all the [node
+variables](/layout/variables/) available to use in the templates.
+
+In addition to the standard node variables, the homepage has access to
+all site content accessible from .Data.Pages
+
+    â–¾ layouts/
+        404.html
+
+## 404.html
+This is a basic example of a 404.html template:
+
+    {{ template "chrome/header.html" . }}
+    {{ template "chrome/subheader.html" . }}
+
+    <section id="main">
+      <div>
+       <h1 id="title">{{ .Title }}</h1>
+      </div>
+    </section>
+
+    {{ template "chrome/footer.html" }}
+
index 782e03dda207ec26771ef510d1b1e437c6e9fcbb..3b903c860d4f2be2b6c712b47b3421c1297c36df 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Chrome Templates"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 80
+weight: 80
+menu:
+  main:
+    parent: 'layout'
 ---
 Chrome is a convention to create templates that are used by the other templates
 throughout the site. There is nothing special about the name "chrome", feel free
index 7bf335e2ac0f619d3467268699e49646a5b86d84..f5efffedd812cb4261573302da046914845d5681 100644 (file)
@@ -1,6 +1,9 @@
 ---
 title: "Content Templates"
 date: "2013-07-01"
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Content templates are created in a directory matching the name of the content.
index 061c19ef82c95283e1f981783a18bfc2bdb75686..f9cb7f8e7a4d5d9e49a3477ffa1fa1dd66c3fb53 100644 (file)
@@ -2,8 +2,10 @@
 title: "Template Functions"
 date: "2013-07-01"
 linktitle: "Template Functions"
-groups: ["layout"]
-groups_weight: 70
+weight: 70
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Hugo uses the excellent go html/template library for its template engine.
index d50e5858c3059d608d55a4da204d3dac96b982b2..b00e6851de4579aee415b831919d179750456d5d 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Using Go Templates"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 15
+weight: 15
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Hugo uses the excellent [go][] [html/template][gohtmltemplate] library for
index b94f4aa1c738b245c81333d8a9752006bb15de75..313814da0cb514f86840784d9e04d76d8ce09515 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "Homepage Templates"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 30
+weight: 30
 notoc: true
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Home pages are of the type "node" and have all the [node
index 6f012cd036498322186f70dbbb0696d07e5467f8..6dfe87c36f971f02497ef84c99828e0543064929 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Index Templates"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 50
+weight: 50
+menu:
+  main:
+    parent: 'layout'
 ---
 
 An index template is any template that will be used to render multiple pieces of
index e4ab29e6188a51b420ee54eeaae3e9d2c0379d90..876da3d0b0de72af895c700cf25ad59a57f03f17 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "RSS (feed) Templates"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 40
+weight: 40
 notoc: "one"
+menu:
+  main:
+    parent: 'layout'
 ---
 
 A single RSS template is used to generate all of the RSS content for the entire
index ca90d61200219ed3dbb3a1445795499c3c497500..ccfe908a3e82abf44efced8007d2c3c31a2b7951 100644 (file)
@@ -3,8 +3,10 @@ title: "Hugo Templates"
 date: "2013-07-01"
 aliases: ["/doc/templates/"]
 linktitle: "Overview"
-groups: ["layout"]
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Hugo uses the excellent go html/template library for its template engine.
index d269c026f05127ca4b02114c02aebcf6132ea792..24c8b5da58cc3f0199ab171d220bc52108dcbba9 100644 (file)
@@ -2,8 +2,10 @@
 title: "Variables"
 date: "2013-07-01"
 aliases: ["/doc/variables/"]
-groups: ["layout"]
-groups_weight: 20
+weight: 20
+menu:
+  main:
+    parent: 'layout'
 ---
 
 Hugo makes a set of values available to the templates. Go templates are context based. The following
index ae22211f9dee105b2f373894ec28584fdc505df7..43391c782de9c76fb3c345e2184d4db5e2968a1c 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Content Views"
 date: "2013-07-01"
-groups: ["layout"]
-groups_weight: 70
+weight: 70
+menu:
+  main:
+    parent: 'layout'
 ---
 
 In addition to the [single content view](/layout/content/), Hugo can render alternative views of
index f4bfcccbda399183a845b38aee3e9f40baba38bf..e1aceacbd5d83367954f12346a00a0379d7a49f8 100644 (file)
@@ -2,8 +2,10 @@
 title: "License"
 date: "2013-07-01"
 aliases: ["/doc/license/", "/license/"]
-groups: ["meta"]
-groups_weight: 50
+weight: 50
+menu:
+  right:
+    parent: 'meta'
 ---
 
 Hugo is released under the Simple Public License.
index 091a503df1c0e208a36c73336be30a8d2a194a43..bd8fe1ade22a1ab727ca5b65db2cbb05d3306995 100644 (file)
@@ -2,8 +2,10 @@
 title: "Release Notes"
 date: "2013-07-01"
 aliases: ["/doc/release-notes/"]
-groups: ["meta"]
-groups_weight: 10
+weight: 10
+menu:
+  right:
+    parent: 'meta'
 ---
 ## **0.10.0** March 1, 2014
   * [Syntax highlighting](/extras/highlighting) powered by pygments (**slow**)
index b5234f3cf9b832cb715ce77a0987e7a552988184..ddc3ba179f35b1d9a32783c1ba02f2084184dbd4 100644 (file)
@@ -5,6 +5,9 @@ aliases: ["/doc/roadmap/"]
 groups: ["meta"]
 groups_weight: 20
 notoc: true
+menu:
+  right:
+    parent: 'meta'
 ---
 
 In no particular order, here is what we are working on:
index f24ef99343d58fbbfced2801fd54b404b4938064..46c5190a3b20c11e7b81d90d6f5207b384d3f63c 100644 (file)
@@ -2,10 +2,12 @@
 title: "Configuring Hugo"
 date: "2013-07-01"
 aliases: ["/doc/configuration/"]
-groups: ['gettingStarted']
 linktitle: "Configuration"
-groups_weight: 40
+weight: 40
 notoc: true
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 The directory structure and templates provide the majority of the
index a72de884ebb376380af5931532d8185773f3092a..dcf7d7ba7e2d21d5acded401cd318bbd55474275 100644 (file)
@@ -2,8 +2,10 @@
 title: "Installing Hugo"
 date: "2013-07-01"
 aliases: ["/doc/installing/"]
-groups: ['gettingStarted']
-groups_weight: 20
+weight: 20
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 Hugo is written in Go with support for Windows, Linux, FreeBSD and OSX.
index 85367c8bc34e8cc7118412db1b5d3f17097e5175..08185fada2a03dee583e7da87495d9325b851c7e 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "Introduction to Hugo"
 date: "2013-07-01"
-groups: ['gettingStarted']
 linktitle: "Introduction"
-groups_weight: 5
+weight: 5
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 ## What is Hugo?
index c221665d5a4fb78d36996ce7c94613633b0bdd70..26e41b47abed845c97c5bf78ac2169ebab3ddd4a 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "Hugo Quickstart Guide"
 date: "2013-07-01"
-groups: ['gettingStarted']
 linktitle: "Quickstart"
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 ## Step 1. Install Hugo
index 93df6513696220429cd420473ffbadc30a808356..28e4dee57cdc0bd2389e29ae730af0e9141d2ba5 100644 (file)
@@ -2,9 +2,11 @@
 title: "Source Directory Organization"
 date: "2013-07-01"
 aliases: ["/doc/source-directory/"]
-groups: ['gettingStarted']
-groups_weight: 50
+weight: 50
 notoc: true
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 Hugo takes a single directory and uses it as the input for creating a complete website.
index cb94669f592c8e71b14c3ebcccad073c99adc5c9..1933f94080e0b71ba5f209044a1e2c225f93f128 100644 (file)
@@ -2,9 +2,11 @@
 title: "Using Hugo"
 date: "2013-07-01"
 aliases: ["/doc/usage/"]
-groups: ['gettingStarted']
-groups_weight: 30
+weight: 30
 notoc: true
+menu:
+  main:
+    parent: 'getting started'
 ---
 
 Make sure either hugo is in your path or provide a path to it.
index 5be9b5ce089cc73c290b5dfa656153670cf4340d..b9d77919cad57a81434d5b84e03d078001cad2a2 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "Hosting a Blog on GitHub Pages"
 date: "2014-03-21"
-groups: ["tutorials"]
-groups_weight: 10
+weight: 10
 author: "Spencer Lyon"
+menu:
+  main:
+    parent: 'tutorials'
 ---
 
 ## Intro
index c0e204eb7b4170b7cfc1a74a55f8cd55971d60cc..dc68a4901930e0bd0fca91ce8b0ca3bc407a2656 100644 (file)
@@ -1,9 +1,11 @@
 ---
 title: "MathJax Support"
 date: "2014-03-20"
-groups: ["tutorials"]
-groups_weight: 10
+weight: 10
 author: "Spencer Lyon"
+menu:
+  main:
+    parent: 'tutorials'
 ---
 
 ## What is MathJax?
index 14dd3ae77a9571afd1ed3c5bd6437b509fcbd5de..a21ca8f49a8b21faf8bfcda7e515d34a3d9fcf59 100644 (file)
@@ -1,8 +1,10 @@
 ---
 title: "Migrate to Hugo from Jekyll"
 date: "2014-03-10"
-groups: ["tutorials"]
-groups_weight: 10
+weight: 10
+menu:
+  main:
+    parent: 'tutorials'
 ---
 
 ## Move static content to `static`
index a20fdf07013c0daca3d32269e5da40aeabea21c9..14ee466d891795f068c2faaafd9cc914e886d7d7 100644 (file)
@@ -1,5 +1,3 @@
-<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
-  <!-- Brand and toggle get grouped for better mobile display -->
   <div class="navbar-header">
     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
       <span class="sr-only">Toggle navigation</span>
   <!-- Collect the nav links, forms, and other content for toggling -->
   <div class="collapse navbar-collapse navbar-ex1-collapse">
     <ul class="nav navbar-nav">
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting Started <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.gettingstarted.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Content <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.content.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Layout <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.layout.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Indexes <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.indexes.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Extras <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.extras.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.tutorials.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Community <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            <li hugo-nav="showcase"><a href="/showcase"> Showcase </a> </li>
-            {{ range $key, $value := .Site.Indexes.groups.community.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
+      {{ $currentNode := . }}
+      {{ range .Site.Menus.main }}
+          {{ if .HasChildren }}
+          <li class="dropdown{{if $currentNode.HasMenuCurrent "main" . }} active-child{{end}}">
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
+            <ul class="dropdown-menu">
+            {{ range .Children }}
+                <li{{if $currentNode.IsMenuCurrent "main" .Name}} class="active"{{end}}><a href="{{.Url}}"> {{ .Name }} </a> </li>
+            {{ end }}
+            </ul>
+          {{else}}
+            <li>
+            <a href="{{.Url}}"> {{ .Name }} </a>
+          {{end}}
+          </li>
+      {{end}}
     </ul>
     <ul class="nav navbar-nav navbar-right">
-      <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Meta <b class="caret"></b></a>
-        <ul class="dropdown-menu">
-            {{ range $key, $value := .Site.Indexes.groups.meta.Pages }}
-            <li hugo-nav="{{$value.RelPermalink}}"><a href="{{$value.Permalink}}"> {{ $value.LinkTitle }} </a> </li>
-            {{ end }}
-        </ul>
-      </li>
+      {{ $currentNode := . }}
+      {{ $menu := "right"}}
+      {{ range .Site.Menus.right }}
+          {{ if .HasChildren }}
+          <li class="dropdown{{if $currentNode.HasMenuCurrent $menu . }} active-child{{end}}">
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
+            <ul class="dropdown-menu">
+            {{ range .Children }}
+                <li{{if $currentNode.IsMenuCurrent $menu .Name}} class="active"{{end}}><a href="{{.Url}}"> {{ .Name }} </a> </li>
+            {{ end }}
+            </ul>
+          {{else}}
+            <li>
+            <a href="{{.Url}}"> {{ .Name }} </a>
+          {{end}}
+          </li>
+      {{end}}
       <li><a href="http://github.com/spf13/hugo/releases"><i class="icon-arrow-down "> </i></a></li>
       <li><a href="http://github.com/spf13/hugo"><i class="icon-octocat icon-2x"> </i></a></li>
     </ul>