From ca807c2ad6757b356e0ca11040b3bba7a9d597c3 Mon Sep 17 00:00:00 2001 From: panr Date: Fri, 22 Feb 2019 10:06:03 +0100 Subject: [PATCH] Small fixes to reading time feature --- README.md | 2 +- exampleSite/config.toml | 4 ++++ layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ad22c5..21bcba8 100644 --- a/README.md +++ b/README.md @@ -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] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e315abf..2d49a62 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -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" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6da2c7e..93eb8fc 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -13,7 +13,7 @@ {{ with .Params.Author }}— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}{{ end }} {{ if $.Site.Params.ShowReadingTime }} - — ⏰ {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} + — {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b30f221..0a2a768 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -9,7 +9,7 @@ {{ end }} {{ with .Params.Author }}— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}{{ end }} {{ if $.Site.Params.ShowReadingTime }} - — ⏰ {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} + — {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }} {{ end }}