about summary refs log tree commit diff
path: root/themes/researcher
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-08-30 00:54:19 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-10 22:33:18 +0200
commit2f8a573334691004a48171c1a4008b71bda8dc6e (patch)
treecc704381328a3c858dc6e496e6ab45a313343704 /themes/researcher
parentMisc: Remove github pages hook (diff)
downloadbaitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.tar.gz
baitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.tar.bz2
baitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.zip
Add readtime for blog entries
Diffstat (limited to 'themes/researcher')
-rw-r--r--themes/researcher/layouts/_default/single.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/themes/researcher/layouts/_default/single.html b/themes/researcher/layouts/_default/single.html
index 2bc2b1e..58835f3 100644
--- a/themes/researcher/layouts/_default/single.html
+++ b/themes/researcher/layouts/_default/single.html
@@ -1,5 +1,13 @@
 {{ define "main" }}
 <div class="container">
-    {{ .Content }}
+{{ if eq .Type "blog" }}
+        <span class="date">{{ .PublishDate.Format "January 2, 2006" }} - </span>
+	<span class="words">{{ .WordCount }} words - </span>
+	<span class="reading">{{ .ReadingTime }} minute read.</span>
+{{ end }}
+{{ .Content }}
+{{ if eq .Type "blog" }}
+	<span class="lastmod">Last updated {{ .Lastmod.Format "Jan 2, 2006" }}</span>
+{{ end }}
 </div>
 {{ end }}