use param button for main nav link text for pages if it's set

This commit is contained in:
Gabriele Musco 2021-04-14 12:05:31 +02:00
parent cb92d2fdd9
commit 569a2672e4
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@
{{ $pagesDir := .Site.Params.Pages | default (slice "pages") }}
{{ $pagesList := where .Site.RegularPages "Section" "in" $pagesDir }}
{{ range $pagesList }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
<li><a href="{{ .Permalink }}">
{{ or .Params.Button .Title }}
</a></li>
{{ end }}
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>