mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Implementing new menu system in the docs site
This commit is contained in:
parent
9ecf58e29b
commit
11fe227b9e
45 changed files with 214 additions and 155 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
---
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
title: "Sections"
|
||||
date: "2013-07-01"
|
||||
groups: ['content']
|
||||
groups_weight: 20
|
||||
menu:
|
||||
main:
|
||||
parent: 'content'
|
||||
weight: 20
|
||||
notoc: true
|
||||
---
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
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
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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**)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue