diff options
-rw-r--r-- | exampleSite/config.toml | 10 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8167499..c3336c0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -42,22 +42,26 @@ name = "Home" URL = "/" weight = 1 -# main menu [[menu.main]] name = "Products" URL = "products" weight = 2 -# main menu [[menu.main]] name = "Blog" URL = "blog" weight = 3 [[menu.main]] +name = "Review" +pre = "#" +URL = "testimonial" +weight = 4 + +[[menu.main]] name = "Contact" URL = "contact" -weight = 4 +weight = 5 # footer menu [[menu.footer]] diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 622ab72..7f920f5 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,7 +12,7 @@ <ul class="navbar-nav ml-auto"> {{ range site.Menus.main }} <li class="nav-item"> - <a class="nav-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a> + <a class="nav-link" href="{{if .Pre}}{{site.BaseURL | absLangURL}}{{.Pre}}{{ .URL }}{{else}}{{.URL | absLangURL}}{{end}}">{{ .Name }}</a> </li> {{ end }} </ul> |