Remove forward slash for relLangURL

This commit is contained in:
Vincent Tam 2019-08-07 11:37:06 +02:00
parent 4f59157d5b
commit 8b887314e2
3 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
<div class="container">
<div class="section tags-list">
{{- range $key, $value:= .Data.Terms -}}
<a class="tag-cloud" href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">{{ $key }}&nbsp;({{ $value.Count }})</a>
<a class="tag-cloud" href="{{ "" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">{{ $key }}&nbsp;({{ $value.Count }})</a>
{{- end -}}
</div>
</div>

View file

@ -47,7 +47,7 @@
<p>
Tag{{ if gt $len 1 }}s{{ end }}:
{{ range $index, $tag := .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
<a href="{{ "tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
{{ end }}
</p>
{{ end }}

View file

@ -37,7 +37,7 @@
{{ else }}
<!-- use default menu -->
{{ if not $isHome }}
<a class="navbar-item" href="{{ "/" | relLangURL }}">{{ i18n "nav_main" . }}</a>
<a class="navbar-item" href="{{ "" | relLangURL }}">{{ i18n "nav_main" . }}</a>
{{ end }}
{{ with .Site.GetPage "/home" }}
@ -56,7 +56,7 @@
{{ if eq (os.Stat .File.Dir).Name "projects" }}
<!-- Now for some cool projects -->
{{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
{{ else }}
{{ $pageIsInProjects := eq $.Page.Section "project"}}
{{ if not (and $pageIsInProjects (eq $.Page.Kind "section")) }}
@ -72,7 +72,7 @@
{{ else if eq (os.Stat .File.Dir).Name "blog" }}
<!-- Let`s show some blog posts -->
{{ if $isHome }}
<a class="navbar-item" href="{{ printf "/#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
{{ else }}
{{ $pageIsInBlog := eq $.Page.Section "blog"}}
{{ if not (and $pageIsInBlog (eq $.Page.Kind "section")) }}
@ -86,7 +86,7 @@
{{ end }}
{{ end }}
{{ else }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ 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 }}
@ -94,7 +94,7 @@
{{ with .Site.GetPage "/home" }}
{{ with .Resources.GetMatch "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}