Introduced boolean variable showReadingTime to activate reading time feature. Added translation for 'min read'. Changed hyphen to em dash.
This commit is contained in:
parent
32ea5dc5cf
commit
ace5be049f
3 changed files with 9 additions and 2 deletions
|
@ -67,6 +67,8 @@ paginate = 5
|
||||||
defaultTheme = "dark"
|
defaultTheme = "dark"
|
||||||
# if you set this to 0, only submenu trigger will be visible
|
# if you set this to 0, only submenu trigger will be visible
|
||||||
showMenuItems = 2
|
showMenuItems = 2
|
||||||
|
# Enable to show reading time in minutes for posts
|
||||||
|
showReadingTime = false
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
|
@ -80,6 +82,7 @@ paginate = 5
|
||||||
readOtherPosts = "Read other posts"
|
readOtherPosts = "Read other posts"
|
||||||
newerPosts = "Newer posts"
|
newerPosts = "Newer posts"
|
||||||
olderPosts = "Older posts"
|
olderPosts = "Older posts"
|
||||||
|
minuteReadingTime = "min read"
|
||||||
|
|
||||||
[languages.en.params.logo]
|
[languages.en.params.logo]
|
||||||
logoText = "hello friend"
|
logoText = "hello friend"
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format "2006-01-02" }}
|
||||||
</span>
|
</span>
|
||||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ 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>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="post-read-time">- ⏰ {{ .ReadingTime }} min read</span>
|
|
||||||
|
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
<span class="post-tags">
|
<span class="post-tags">
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||||
<span class="post-read-time">- ⏰ {{ .ReadingTime }} min read</span>
|
{{ if $.Site.Params.ShowReadingTime }}
|
||||||
|
<span class="post-read-time">— ⏰ {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.tags }}
|
{{ if .Params.tags }}
|
||||||
|
|
Loading…
Reference in a new issue