Fixed navigation when deployed to subpath

This commit is contained in:
Stephan Hadan 2025-01-29 11:05:27 +01:00
parent 4de04f79f6
commit a61c78495e

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>