shithub: hugo

Download patch

ref: 11fe227b9ed05e536afa25b672c6ac08d85e7e82
parent: 9ecf58e29ba8dafb99f51bfba9bfe9e576410d73
author: spf13 <[email protected]>
date: Tue Apr 22 23:00:11 EDT 2014

Implementing new menu system in the docs site

--- a/docs/content/community/contributing.md
+++ b/docs/content/community/contributing.md
@@ -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
--- a/docs/content/community/contributors.md
+++ b/docs/content/community/contributors.md
@@ -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:
--- a/docs/content/community/mailing-list.md
+++ b/docs/content/community/mailing-list.md
@@ -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:
--- a/docs/content/community/press.md
+++ b/docs/content/community/press.md
@@ -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.
--- a/docs/content/content/example.md
+++ b/docs/content/content/example.md
@@ -3,8 +3,10 @@
 date: "2013-07-01"
 aliases: ["/doc/example/"]
 linktitle: "Example"
-groups: ['content']
-groups_weight: 50
+menu:
+    main:
+        parent: 'content'
+weight: 50
 notoc: true
 ---
 
--- a/docs/content/content/front-matter.md
+++ b/docs/content/content/front-matter.md
@@ -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
--- a/docs/content/content/ordering.md
+++ b/docs/content/content/ordering.md
@@ -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.
--- a/docs/content/content/organization.md
+++ b/docs/content/content/organization.md
@@ -3,8 +3,10 @@
 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
--- a/docs/content/content/sections.md
+++ b/docs/content/content/sections.md
@@ -1,8 +1,10 @@
 ---
 title: "Sections"
 date: "2013-07-01"
-groups: ['content']
-groups_weight: 20
+menu:
+    main:
+        parent: 'content'
+weight: 20
 notoc: true
 ---
 
--- a/docs/content/content/types.md
+++ b/docs/content/content/types.md
@@ -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
--- a/docs/content/extras/aliases.md
+++ b/docs/content/extras/aliases.md
@@ -5,8 +5,10 @@
     - /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
--- a/docs/content/extras/highlighting.md
+++ b/docs/content/extras/highlighting.md
@@ -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
binary files a/docs/content/extras/permalinks.md b/docs/content/extras/permalinks.md differ
--- a/docs/content/extras/shortcodes.md
+++ b/docs/content/extras/shortcodes.md
@@ -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
--- a/docs/content/extras/toc.md
+++ b/docs/content/extras/toc.md
@@ -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
--- a/docs/content/extras/urls.md
+++ b/docs/content/extras/urls.md
@@ -3,9 +3,11 @@
 date: "2014-01-03"
 aliases:
   - "/doc/urls/"
-groups: ["extras"]
-groups_weight: 40
+weight: 40
 notoc: true
+menu:
+  main:
+    parent: 'extras'
 ---
 
 ## Pretty Urls
--- a/docs/content/indexes/displaying.md
+++ b/docs/content/indexes/displaying.md
@@ -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
--- a/docs/content/indexes/lists.md
+++ b/docs/content/indexes/lists.md
@@ -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
--- a/docs/content/indexes/ordering.md
+++ b/docs/content/indexes/ordering.md
@@ -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:
--- a/docs/content/indexes/overview.md
+++ b/docs/content/indexes/overview.md
@@ -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.
--- a/docs/content/indexes/templates.md
+++ b/docs/content/indexes/templates.md
@@ -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.
--- a/docs/content/layout/404.html
+++ /dev/null
@@ -1,31 +1,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" }}
-
--- /dev/null
+++ b/docs/content/layout/404.md
@@ -1,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" }}
+
--- a/docs/content/layout/chrome.md
+++ b/docs/content/layout/chrome.md
@@ -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
--- a/docs/content/layout/content.md
+++ b/docs/content/layout/content.md
@@ -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.
--- a/docs/content/layout/functions.md
+++ b/docs/content/layout/functions.md
@@ -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.
--- a/docs/content/layout/go-templates.md
+++ b/docs/content/layout/go-templates.md
@@ -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
--- a/docs/content/layout/homepage.md
+++ b/docs/content/layout/homepage.md
@@ -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
--- a/docs/content/layout/indexes.md
+++ b/docs/content/layout/indexes.md
@@ -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
--- a/docs/content/layout/rss.md
+++ b/docs/content/layout/rss.md
@@ -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
--- a/docs/content/layout/templates.md
+++ b/docs/content/layout/templates.md
@@ -3,8 +3,10 @@
 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.
--- a/docs/content/layout/variables.md
+++ b/docs/content/layout/variables.md
@@ -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
--- a/docs/content/layout/views.md
+++ b/docs/content/layout/views.md
@@ -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
--- a/docs/content/meta/license.md
+++ b/docs/content/meta/license.md
@@ -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.
--- a/docs/content/meta/release-notes.md
+++ b/docs/content/meta/release-notes.md
@@ -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**)
--- a/docs/content/meta/roadmap.md
+++ b/docs/content/meta/roadmap.md
@@ -5,6 +5,9 @@
 groups: ["meta"]
 groups_weight: 20
 notoc: true
+menu:
+  right:
+    parent: 'meta'
 ---
 
 In no particular order, here is what we are working on:
--- a/docs/content/overview/configuration.md
+++ b/docs/content/overview/configuration.md
@@ -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
--- a/docs/content/overview/installing.md
+++ b/docs/content/overview/installing.md
@@ -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.
--- a/docs/content/overview/introduction.md
+++ b/docs/content/overview/introduction.md
@@ -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?
--- a/docs/content/overview/quickstart.md
+++ b/docs/content/overview/quickstart.md
@@ -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
--- a/docs/content/overview/source-directory.md
+++ b/docs/content/overview/source-directory.md
@@ -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.
--- a/docs/content/overview/usage.md
+++ b/docs/content/overview/usage.md
@@ -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.
--- a/docs/content/tutorials/github_pages_blog.md
+++ b/docs/content/tutorials/github_pages_blog.md
@@ -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
--- a/docs/content/tutorials/mathjax.md
+++ b/docs/content/tutorials/mathjax.md
@@ -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?
--- a/docs/content/tutorials/migrate-from-jekyll.md
+++ b/docs/content/tutorials/migrate-from-jekyll.md
@@ -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`
--- a/docs/layouts/chrome/menu.html
+++ b/docs/layouts/chrome/menu.html
@@ -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>
@@ -13,73 +11,41 @@
   <!-- 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>
+      {{ $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>
-      </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>
+            </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>
+      {{ $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>
-      </li>
+            </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>