mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2024-11-22 09:35:30 +03:00
Merge pull request #414 from florianbieser/FeatureReadingtimeI18N
option to write the reading time in the same language as the site
This commit is contained in:
commit
bf0dc1643b
2 changed files with 3 additions and 1 deletions
|
@ -230,6 +230,8 @@ paginate = 5
|
|||
olderPosts = "Older posts"
|
||||
missingContentMessage = "Page not found..."
|
||||
missingBackButtonLabel = "Back to home page"
|
||||
minuteReadingTime = "min read"
|
||||
words = "words"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "Terminal"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<span class="post-author">{{ . }}</span>
|
||||
{{ end }}
|
||||
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
||||
<span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
||||
<span class="post-reading-time">:: {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue