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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikDal002 <mikdal_opensource@outlook.com>2021-10-16 11:56:55 +0300
committerGitHub <noreply@github.com>2021-10-16 11:56:55 +0300
commitd04b3a8771386c9988be00adda53f0bf542cf269 (patch)
treec1b24733264c6df98d0952434f317ad5da4fb9d5
parentb3088be62dce87c2f6663700a2689ee308ce729b (diff)
fix: appropriate back button and menu links for multi-language site (#386)
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/sidebar/left.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 902fa98..8b21c52 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -29,7 +29,7 @@
{{ define "left-sidebar" }}
{{ if (.Scratch.Get "hasTOC") }}
<div id="article-toolbar">
- <a href="{{ .Site.BaseURL }}" class="back-home">
+ <a href="{{ .Site.BaseURL | relLangURL }}" class="back-home">
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
<span>{{ T "article.back" }}</span>
</a>
diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html
index c14092f..53a6655 100644
--- a/layouts/partials/sidebar/left.html
+++ b/layouts/partials/sidebar/left.html
@@ -29,7 +29,7 @@
</figure>
{{ end }}
{{ end }}
- <h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
+ <h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
</header>
@@ -39,7 +39,7 @@
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
<li {{ if $active }} class='current' {{ end }}>
- <a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
+ <a href='{{ .URL | relLangURL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ if .Pre }}
{{ partial "helper/icon" .Pre }}
{{ end }}