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

github.com/balaramadurai/hugo-travelify-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarhon <darhon.ua@gmail.com>2019-01-13 18:32:58 +0300
committerGitHub <noreply@github.com>2019-01-13 18:32:58 +0300
commitc3a66d7730329b61d77eca7d0abc33fca762d796 (patch)
tree023eadf85f6d1ddec3fe4a58200eba0403722792
parent9deb5d9d62af9fa25724da89da1d821ec3d85797 (diff)
Fixed of the translation of the "read more" button
The main page didn't display a translation for the "read more" button with lists of articles. The default value "read more" of the $readmore variable always displayed, even when the translation was explicitly specified in the data / l10n.toml file. This PR fixes this.
-rw-r--r--layouts/partials/article_list.html7
1 files changed, 2 insertions, 5 deletions
diff --git a/layouts/partials/article_list.html b/layouts/partials/article_list.html
index b41ed0b..ad50956 100644
--- a/layouts/partials/article_list.html
+++ b/layouts/partials/article_list.html
@@ -1,8 +1,5 @@
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
-{{ $readmore := "Read More" }}
-{{ if .Site.Data.l10n.articles.read_more }}
-{{ $readmore := .Site.Data.l10n.articles.read_more }}
-{{ end }}
+
{{ range $paginator.Pages }}
<section id="main" class="post type-post status-publish format-standard has-post-thumbnail hentry">
<article>
@@ -25,7 +22,7 @@
{{ partial "article_footer" . }}
<span>
<a class="readmore" href="{{ .Permalink }}">
- {{ $readmore }}
+ {{ with .Site.Data.l10n.articles.read_more }}{{ . }}{{ end }}
</a>
</span>