add exposed link in main menu

This commit is contained in:
lafleur 2020-10-14 15:20:21 +02:00
parent 43451d3b31
commit 4c5976d35b
1 changed files with 7 additions and 4 deletions

View File

@ -1,14 +1,17 @@
{{ $currentPage := . }}
<header> <header>
<h1> <h1>
<a href={{ .Site.BaseURL }}>{{ .Site.Title }}</a> <a href="{{ $.Site.BaseURL }}">{{ .Site.Title }}</a>
</h1> </h1>
{{ with .Site.Params.Description }} {{ with $.Site.Params.Description }}
{{ . }} {{ . }}
{{ end }} {{ end }}
<ul class="links"> <ul class="links">
{{ range .Site.Sections }} {{ range $.Site.Sections }}
<li class="link"> <li class="link">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}" class="{{ if eq $currentPage.Section .Section }}exposed{{ end }}">
{{ .Title | markdownify }} >
</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>