Fixed plural-singular issue with reading time indications
This commit is contained in:
parent
77fe18522e
commit
0fbd45a05d
8
content/posts/one-word.de.md
Normal file
8
content/posts/one-word.de.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = 'Deutscher Test Post'
|
||||
date = 2025-04-05T20:14:29+02:00
|
||||
draft = false
|
||||
toc = false
|
||||
+++
|
||||
|
||||
# Nureinwort
|
8
content/posts/one-word.en.md
Normal file
8
content/posts/one-word.en.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = 'English Test Post'
|
||||
date = 2025-04-05T22:48:12+02:00
|
||||
draft = false
|
||||
toc = false
|
||||
+++
|
||||
|
||||
# Justoneword
|
26
hugo.toml
26
hugo.toml
@ -83,7 +83,7 @@ pagination.pagerSize = 5
|
||||
subtitle = "Blog of privacynerd"
|
||||
owner = ""
|
||||
keywords = ""
|
||||
copyright = "© 2025 Benjamin Burkhardt"
|
||||
copyright = "Benjamin Burkhardt"
|
||||
menuMore = "Show more"
|
||||
readMore = "Read more"
|
||||
readOtherPosts = "Read other posts"
|
||||
@ -91,9 +91,14 @@ pagination.pagerSize = 5
|
||||
olderPosts = "Older posts"
|
||||
missingContentMessage = "Page not found..."
|
||||
missingBackButtonLabel = "Back to home page"
|
||||
minuteReadingTime = "min read"
|
||||
words = "words"
|
||||
imprint = "Imprint"
|
||||
_minute = "minute"
|
||||
_minutes = "minutes"
|
||||
_readingTime = "to read"
|
||||
_word = "word"
|
||||
_words = "words"
|
||||
_imprint = "Imprint"
|
||||
_by = "by"
|
||||
_customized = "customized"
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "Privacynerd's blog"
|
||||
@ -120,7 +125,7 @@ pagination.pagerSize = 5
|
||||
subtitle = "Blog von privacynerd"
|
||||
owner = ""
|
||||
keywords = ""
|
||||
copyright = "© 2025 Benjamin Burkhardt"
|
||||
copyright = "Benjamin Burkhardt"
|
||||
menuMore = "Mehr zeigen"
|
||||
readMore = "Mehr lesen"
|
||||
readOtherPosts = "Andere Posts lesen"
|
||||
@ -128,9 +133,14 @@ pagination.pagerSize = 5
|
||||
olderPosts = "Ältere Posts"
|
||||
missingContentMessage = "Seite konnte nicht gefunden werden..."
|
||||
missingBackButtonLabel = "Zurück zur Startseite"
|
||||
minuteReadingTime = "Minuten Lesezeit"
|
||||
words = "Wörter"
|
||||
imprint = "Impressum"
|
||||
_minute = "Minute"
|
||||
_minutes = "Minuten"
|
||||
_readingTime = "Lesezeit"
|
||||
_word = "Wort"
|
||||
_words = "Wörter"
|
||||
_imprint = "Impressum"
|
||||
_by = "von"
|
||||
_customized = "angepasst"
|
||||
|
||||
[languages.de.params.logo]
|
||||
logoText = "Privacynerd's blog"
|
||||
|
@ -16,7 +16,7 @@
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{- end -}}
|
||||
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ if eq .ReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }})</span>
|
||||
{{- end -}}
|
||||
<!-- comments counter -->{{ partial "comments_counter.html" . }}
|
||||
</div>
|
||||
|
@ -2,13 +2,13 @@
|
||||
<div class="footer__inner">
|
||||
{{ if $.Site.Params.Copyright }}
|
||||
<div class="copyright copyright--user">
|
||||
<span>{{ $.Site.Params.Copyright | safeHTML }}</span>
|
||||
<span>© {{ now.Year }} {{ $.Site.Params.Copyright | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
|
||||
{{ end }}
|
||||
<span style="margin-right: 10px">:: <a href="https://privacynerd.de/impressum?referrer={{ $.Site.BaseURL }}" target="_blank">{{ $.Site.Params.Imprint }}</a></span>
|
||||
<span>:: <a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank">Theme</a> by <a href="https://github.com/mirus-ua" target="_blank">Mirus</a> (customized)</span>
|
||||
<span style="margin-right: 10px">:: <a href="https://privacynerd.de/impressum?referrer={{ $.Site.BaseURL }}" target="_blank">{{ $.Site.Params._Imprint }}</a></span>
|
||||
<span>:: <a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank">Theme</a> {{ $.Site.Params._By }} <a href="https://github.com/mirus-ua" target="_blank">Mirus</a> ({{ $.Site.Params._Customized }})</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
Loading…
x
Reference in New Issue
Block a user