From de960997bc835f75c328af55f3a3c402cf39121d Mon Sep 17 00:00:00 2001
From: Florian <26717601+florianbieser@users.noreply.github.com>
Date: Wed, 18 Jan 2023 16:51:20 +0100
Subject: [PATCH] option to write the reading time in the same language as the
site
---
README.md | 2 ++
layouts/_default/single.html | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c88ba74..bcc883b 100644
--- a/README.md
+++ b/README.md
@@ -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"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 1bc4328..f85fc5d 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -16,7 +16,7 @@
{{ . }}
{{ end }}
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
- :: {{ .ReadingTime }} min read ({{ .WordCount }} words)
+ :: {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})
{{ end }}