Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong-Siang Shih (Shaform) <shaform@gmail.com>2018-07-11 05:05:38 +0300
committerChen Xianmin <xianmin12@gmail.com>2018-07-11 05:05:38 +0300
commitdbe4a41a87e71400c78821cf913f5e3a3fccc295 (patch)
treee6dc28c7ba68f8353e3bf5f784a2f1342b588e14
parent6b6722a8414856380d8138761fbeaab12ab2860f (diff)
fix: use relLangURL for multilingual support (#76)
-rw-r--r--layouts/404.html2
-rw-r--r--layouts/_default/terms.html8
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/slideout.html2
-rw-r--r--layouts/post/single.html4
-rw-r--r--layouts/post/summary.html2
6 files changed, 10 insertions, 10 deletions
diff --git a/layouts/404.html b/layouts/404.html
index 50e1860..fcf2b37 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -4,7 +4,7 @@
<div class="not-found">
<h1 class="error-emoji"></h1>
<p class="error-text">/* 404 page not found. */</p>
- <p class="error-link"><a href="{{ "/" | relURL }}">↑ Back Home ↑</a></p>
+ <p class="error-link"><a href="{{ "/" | relLangURL }}">↑ Back Home ↑</a></p>
</div>
<script>
var errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 4277289..ee18a72 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -13,7 +13,7 @@
</div>
<div class="collection-title">
<h2 class="archive-year">
- <a href="{{ $termName | urlize | relURL }}/{{ $value.Term | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}">
+ <a href="{{ $termName | urlize | relLangURL }}/{{ $value.Term | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}">
{{ i18n "category" }}{{ $value.Term }}
</a>
</h2>
@@ -33,7 +33,7 @@
{{ end }}
{{ if gt (len $value.Pages) 5 }}
<div class="more-post">
- <a href="{{ $termName | urlize | relURL }}/{{ $value.Term | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}" class="more-post-link">{{ i18n "morePost" }}</a>
+ <a href="{{ $termName | urlize | relLangURL }}/{{ $value.Term | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}" class="more-post-link">{{ i18n "morePost" }}</a>
</div>
{{ end }}
</section>
@@ -62,11 +62,11 @@
{{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }}
<!--Current font size: {{$currentFontSize}}-->
- <a href="{{ $termName | urlize | relURL }}/{{ $tagName | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"
+ <a href="{{ $termName | urlize | relLangURL }}/{{ $tagName | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"
style="font-size:{{$currentFontSize}}{{$fontUnit}}">{{ $tagName }}</a>
{{ end }}
</div>
</div>
{{ end }}
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 5362707..e143225 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,5 +1,5 @@
<div class="logo-wrapper">
- <a href="{{ "/" | relURL }}" class="logo">
+ <a href="{{ "/" | relLangURL }}" class="logo">
{{ if .Site.Params.logoTitle }}
{{ .Site.Params.logoTitle | safeHTML }}
{{ else }}
diff --git a/layouts/partials/slideout.html b/layouts/partials/slideout.html
index 4bddf8b..bc0a15e 100644
--- a/layouts/partials/slideout.html
+++ b/layouts/partials/slideout.html
@@ -1,6 +1,6 @@
<div id="mobile-navbar" class="mobile-navbar">
<div class="mobile-header-logo">
- <a href="{{ "/" | relURL }}" class="logo">
+ <a href="{{ "/" | relLangURL }}" class="logo">
{{- if .Site.Params.logoTitle -}}
{{ .Site.Params.logoTitle }}
{{- else -}}
diff --git a/layouts/post/single.html b/layouts/post/single.html
index dad48ac..a6fdb5d 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -10,7 +10,7 @@
{{ with .Params.categories -}}
<div class="post-category">
{{ range . }}
- <a href="{{ "categories" | relURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"> {{ . }} </a>
+ <a href="{{ "categories" | relLangURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"> {{ . }} </a>
{{ end }}
</div>
{{- end }}
@@ -39,7 +39,7 @@
{{ with .Params.tags -}}
<div class="post-tags">
{{ range . }}
- <a href="{{ "tags" | relURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}">{{ . }}</a>
+ <a href="{{ "tags" | relLangURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}">{{ . }}</a>
{{ end }}
</div>
{{- end }}
diff --git a/layouts/post/summary.html b/layouts/post/summary.html
index 5524fa6..bf2cfd9 100644
--- a/layouts/post/summary.html
+++ b/layouts/post/summary.html
@@ -7,7 +7,7 @@
{{ with .Params.categories -}}
<div class="post-category">
{{ range . }}
- <a href="{{ "categories" | relURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"> {{ . }} </a>
+ <a href="{{ "categories" | relLangURL }}/{{ . | urlize }}{{if $.Site.Params.uglyURLs}}.html{{else}}/{{end}}"> {{ . }} </a>
{{ end }}
</div>
{{- end }}