Fixed navigation when deployed to subpath #21

Merged
stephan.hadan merged 1 commit from hotfix/fix-navigation-when-deployed-to-subpath into main 2025-01-29 11:06:06 +01:00

View file

@ -7,22 +7,22 @@
<ul> <ul>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li> <li>
<a href="{{.URL}}">{{ .Name }}</a> <a href="{{.Site.BaseURL}}{{.URL}}">{{ .Name }}</a>
{{ if in ($.Scratch.Get "sections") .Name }} {{ 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 }} {{ 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.BaseURL}}{{ . }}">Über</a></li>{{ end }}
</ul> </ul>
{{ else }} {{ else }}
<ul> <ul>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li> <li>
<a href="{{.URL}}">{{ .Name }}</a> <a href="{{.Site.BaseURL}}{{.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.BaseURL}}{{ . }}">Über</a></li>{{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>