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
2290dedf
Commit
2290dedf
authored
Mar 05, 2017
by
IKEDA Kiyoshi
Committed by
GitHub
Mar 05, 2017
Browse files
Merge pull request #26 from key-amb/feature/menu
Fix #23 / Switch to Hugo's built-in Menu System
parents
1137a65b
234127a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
2290dedf
...
...
@@ -10,6 +10,7 @@ You can see demo and full documentation at http://key-amb.github.io/bootie-docs-
## CONTENTS
*
[
QUICKSTART
](
#quickstart
)
*
[
MENUS
](
#menus
)
*
[
OPTIONS
](
#options
)
*
[
LIMITATION
](
#limitation
)
*
[
DEPENDENCIES
](
#dependencies
)
...
...
@@ -22,29 +23,40 @@ You can see demo and full documentation at http://key-amb.github.io/bootie-docs-
Then the content appears on top page.
##
OPTION
S
##
MENU
S
You can customize the menu items in the header navigation bar by configuring
`params.mainMenu`
in your _config.toml_ (or _config.yaml_).
You can customize the menu items in the header navigation bar by configuring
`menu.main`
in your
_config.toml_
(or _config.yaml_) supported by Hugo's
[
Menu System
](
https://gohugo.io/extras/menus/
)
.
```
# example of config.toml
[params]
highlightStyle = "github"
[[params.mainMenu]]
name = "Usage"
link = "usage"
[[menu.main]]
name = "Usage"
url = "/usage/"
weight = 10
[[params.mainMenu]]
name = "News"
link = "categories/news"
[[menu.main]]
name = "News"
url = "/categories/news/"
weight = 20
```
All other options and usages are described at the documentation site -- http://key-amb.github.io/bootie-docs-demo/ .
NOTE:
-
Nested menus are not supported.
## OPTIONS
All other options and usages for _Bootie Docs_ are described at the documentation site --
http://key-amb.github.io/bootie-docs-demo/ .
## LIMITATION
Because _Bootie Docs_ is developed for documentation, it lacks many blog-type facilities such as RSS feeds, pagination of posts and so on.
Because _Bootie Docs_ is developed for documentation, it lacks many blog-type facilities such as RSS
feeds, pagination of posts and so on.
## DEPENDENCIES
...
...
layouts/partials/header.html
View file @
2290dedf
...
...
@@ -32,11 +32,10 @@
<div
id=
"navbar"
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li
{{
if
.
IsHome
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/"
>
Home
</a></li>
{{ $url := .
Permalink
}}
{{ with .Site.
Param
s.main
Menu
}}
{{ $url := .
URL
}}
{{ with .Site.
Menu
s.main }}
{{ range $menu := . }}
{{ $itemUrl := printf "%s/%s" $baseUrl $menu.link }}
<li
{{
if
eq
$
url
$
itemUrl
}}
class=
"active"
{{
end
}}
><a
href=
"{{ $baseUrl }}/{{ $menu.link }}"
>
{{ $menu.name }}
</a></li>
<li
{{
if
eq
$
url
.
URL
}}
class=
"active"
{{
end
}}
><a
href=
"{{ .URL }}"
>
{{ .Name }}
</a></li>
{{ end }}
{{ end }}
{{ if not .Site.Params.noCategoryLink }}
...
...
Write
Preview
Supports
Markdown
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