diff options
author | Olivier Roques <olivier@oroques.dev> | 2020-11-25 11:31:11 +0100 |
---|---|---|
committer | Olivier Roques <olivier@oroques.dev> | 2020-11-25 11:31:11 +0100 |
commit | 702753e3580bc30e8c904eb072e98f46296202ed (patch) | |
tree | 31ce8ef21e69a1b1950fb1627b59851a6d269e34 /layouts/partials/header.html | |
parent | 19019bf8fdefbca6963bd550daaeb1fa61ffae3e (diff) |
Add support for menu item pre and post hooks
Closes #8
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r-- | layouts/partials/header.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7fcd975..aba1999 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,7 +5,9 @@ {{ with .Site.Menus.main }} {{ $navbar_len := len . }} {{ range $i, $nav_item := . }} - <a class="nav-item nav-link" href="{{ $nav_item.URL }}">{{ $nav_item.Name }}</a> + <a class="nav-item nav-link" href="{{ $nav_item.URL }}"> + {{ $nav_item.Pre }}{{ $nav_item.Name }}{{ $nav_item.Post }} + </a> {{ if ne (add $i 1) $navbar_len }} <span class="nav-item navbar-text mx-1">/</span> {{ end }} |