diff options
| author | Baitinq <[email protected]> | 2022-08-30 00:54:19 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2022-10-10 22:33:18 +0200 |
| commit | 2f8a573334691004a48171c1a4008b71bda8dc6e (patch) | |
| tree | cc704381328a3c858dc6e496e6ab45a313343704 | |
| parent | Misc: Remove github pages hook (diff) | |
| download | baitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.tar.gz baitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.tar.bz2 baitinq.ml-2f8a573334691004a48171c1a4008b71bda8dc6e.zip | |
Add readtime for blog entries
| -rw-r--r-- | config.toml | 1 | ||||
| -rw-r--r-- | themes/researcher/layouts/_default/single.html | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/config.toml b/config.toml index a8dec18..7dfa49f 100644 --- a/config.toml +++ b/config.toml @@ -2,6 +2,7 @@ baseURL = 'https://baitinq.ml' languageCode = 'en-us' title = 'Baitinq' enableRobotsTXT = true +enableGitInfo = true theme = "researcher" 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 }} |