Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
University of Michigan Fencing
club-theme
Commits
09ae43f0
Commit
09ae43f0
authored
May 07, 2016
by
YASUTAKE Kiyoshi
Browse files
Merge pull request #14 from key-amb/develop
Change: format of 'params.mainMenu' is now array of tables
parents
2e5a0d1c
480a03ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
09ae43f0
...
...
@@ -29,8 +29,15 @@ You can customize the menu items in the header navigation bar by configuring `pa
```
# example of config.toml
[params]
mainMenu = ["about", "usage"]
highlightStyle = "github"
[[params.mainMenu]]
name = "Usage"
link = "usage"
[[params.mainMenu]]
name = "News"
link = "categories/news"
```
All other options and usages are described at the documentation site -- http://key-amb.github.io/bootie-docs-demo/ .
...
...
layouts/partials/header.html
View file @
09ae43f0
...
...
@@ -35,9 +35,9 @@
<li
{{
if
eq
$
isHomePage
true
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/"
>
Home
</a></li>
{{ if isset .Site.Params "mainMenu" }}
{{ $url := .Permalink }}
{{ range $
item
:= .Site.Params.mainMenu }}
{{ $itemUrl := printf "%s/%s/" $baseUrl $
item
}}
<li
{{
if
eq
$
url
$
itemUrl
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/{{ $
item }}"
>
{{ title $item
}}
</a></li>
{{ range $
menu
:= .Site.Params.mainMenu }}
{{ $itemUrl := printf "%s/%s/" $baseUrl $
menu.link
}}
<li
{{
if
eq
$
url
$
itemUrl
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/{{ $
menu.link }}"
>
{{ $menu.name
}}
</a></li>
{{ end }}
{{ end }}
{{ if isset .Site.Params "noCategoryLink" }}{{ else }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment