diff options
author | somratpro <abdulmonnafsomrat@gmail.com> | 2020-09-17 13:50:25 +0300 |
---|---|---|
committer | somratpro <abdulmonnafsomrat@gmail.com> | 2020-09-17 13:50:25 +0300 |
commit | bfbb1fa9ce55e0b46dbf41e6b6d659b9b42e2fc9 (patch) | |
tree | 896831c8090f861da99a5e2fce32c4348d4946d0 | |
parent | c8fbd8be11826e95f06fc73409fe9de01972af4b (diff) |
modified navvigation
-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> |