Fix url for links to home

This commit is contained in:
Hanzei 2018-08-22 08:38:18 +02:00
parent cec1b43798
commit 1abc809ca9
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0

View file

@ -43,7 +43,7 @@
{{ with .Site.GetPage "/home" }} {{ with .Site.GetPage "/home" }}
{{ range sort (.Resources.ByType "page") "Params.weight" }} {{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }} {{ if ne .Name "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | absLangURL }}{{ end }}">{{ .Title }}</a> <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -88,7 +88,7 @@
{{ with .Site.GetPage "/home" }} {{ with .Site.GetPage "/home" }}
{{ with .Resources.GetMatch "contact.md" }} {{ with .Resources.GetMatch "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | absLangURL }}{{ end }}">{{ .Title }}</a> <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}