Another try to fix menu on subpath deployed sites #23

Merged
stephan.hadan merged 1 commit from hotfix/fix-menu-on-subpath-deployed-sites into main 2025-01-29 11:50:41 +01:00

View file

@ -1,6 +1,6 @@
<header> <header>
<nav> <nav>
<h1><a href="{{.Site.BaseURL}}">@{{ .Site.Params.Author.handle }}</a> {{ .Site.Title }}.</h1> <h1><a href="{{.site.Home.RelPermalink}}">@{{ .Site.Params.Author.handle }}</a> {{ .Site.Title }}.</h1>
<div class="menu"> <div class="menu">
{{ if isset .Site.Params "rsssections" }} {{ if isset .Site.Params "rsssections" }}
{{ $.Scratch.Add "sections" .Site.Params.rsssections }} {{ $.Scratch.Add "sections" .Site.Params.rsssections }}
@ -13,7 +13,7 @@
{{ end }} {{ end }}
</li> </li>
{{ end }} {{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">Über</a></li>{{ end }} {{ with .Site.Params.Author.aboutpage }}<li><a href="{{.site.Home.RelPermalink}}{{ . }}">Über</a></li>{{ end }}
</ul> </ul>
{{ else }} {{ else }}
<ul> <ul>
@ -22,7 +22,7 @@
<a href="{{.URL}}">{{ .Name }}</a> <a href="{{.URL}}">{{ .Name }}</a>
</li> </li>
{{ end }} {{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">Über</a></li>{{ end }} {{ with .Site.Params.Author.aboutpage }}<li><a href="{{.site.Home.RelPermalink}}{{ . }}">Über</a></li>{{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>