Merge pull request 'Fixed navigation when deployed to subpath' (#21) from hotfix/fix-navigation-when-deployed-to-subpath into main

Reviewed-on: stiebke/hugo-internet-weblog#21
This commit is contained in:
Stephan Hadan 2025-01-29 11:06:05 +01:00
commit f4cd72bf25

View file

@ -7,22 +7,22 @@
<ul>
{{ range .Site.Menus.main }}
<li>
<a href="{{.URL}}">{{ .Name }}</a>
<a href="{{.Site.BaseURL}}{{.URL}}">{{ .Name }}</a>
{{ if in ($.Scratch.Get "sections") .Name }}
<a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
<a href="{{.Site.BaseURL}}{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
{{ end }}
</li>
{{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">Über</a></li>{{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{.Site.BaseURL}}{{ . }}">Über</a></li>{{ end }}
</ul>
{{ else }}
<ul>
{{ range .Site.Menus.main }}
<li>
<a href="{{.URL}}">{{ .Name }}</a>
<a href="{{.Site.BaseURL}}{{.URL}}">{{ .Name }}</a>
</li>
{{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{ . }}">Über</a></li>{{ end }}
{{ with .Site.Params.Author.aboutpage }}<li><a href="{{.Site.BaseURL}}{{ . }}">Über</a></li>{{ end }}
</ul>
{{ end }}
</div>