Small fixes to reading time feature

This commit is contained in:
panr 2019-02-22 10:06:03 +01:00
parent f234269325
commit ca807c2ad6
4 changed files with 7 additions and 3 deletions

View File

@ -67,7 +67,7 @@ paginate = 5
defaultTheme = "dark"
# if you set this to 0, only submenu trigger will be visible
showMenuItems = 2
# Enable to show reading time in minutes for posts
# Show reading time in minutes for posts
showReadingTime = false
[languages]

View File

@ -8,7 +8,10 @@ paginate = 5
contentTypeName = "post"
# "light" or "dark"
defaultTheme = "dark"
# if you set this to 0, only submenu trigger will be visible
showMenuItems = 2
# Enable to show reading time in minutes for posts
showReadingTime = false
[languages]
[languages.en]
@ -22,6 +25,7 @@ paginate = 5
readOtherPosts = "Read other posts"
newerPosts = "Newer posts"
olderPosts = "Older posts"
minuteReadingTime = "min read"
[languages.en.params.logo]
logoText = "hello friend"

View File

@ -13,7 +13,7 @@
</span>
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
{{ if $.Site.Params.ShowReadingTime }}
<span class="post-read-time">{{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
{{ end }}
</div>

View File

@ -9,7 +9,7 @@
{{ end }}
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
{{ if $.Site.Params.ShowReadingTime }}
<span class="post-read-time">{{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
{{ end }}
</div>