Update theme metedata/reading time

This commit is contained in:
Ariejan de Vroom 2020-03-11 10:18:52 +01:00
parent 930822c62f
commit cbdd093a28
3 changed files with 26 additions and 9 deletions

View File

@ -17,6 +17,8 @@ pygmentscodefencesguesssyntax = true
googleAnalytics = "UA-60089-16" googleAnalytics = "UA-60089-16"
disqusShortname = "" disqusShortname = ""
enableGitInfo = true
[permalinks] [permalinks]
posts = "/:year/:month/:day/:slug" posts = "/:year/:month/:day/:slug"

View File

@ -132,4 +132,9 @@ small {
.meta { .meta {
color: $meta; color: $meta;
} }
.reading-time {
display: inline-block;
float: right;
}

View File

@ -1,16 +1,26 @@
{{ $lastmod := .Lastmod.Format "2006-01-02" }}
{{ $date := .Date.Format "2006-01-02" }}
<article> <article>
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<div class="meta"> <div class="meta">
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'> Posted: <time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02" ) }} {{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02" ) }}
</time> </time>
- {{ if not (eq $lastmod $date) }}
tagged - Last updated: <time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{ .Lastmod.Format (.Site.Params.dateFormat | default "2006-01-02" ) }}
</time>
{{ end }}
<div class="reading-time">
~{{ .FuzzyWordCount }}wrds
(~{{ .ReadingTime }}min)
</div>
<br />
Tagged
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }} {{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
-
{{ .ReadingTime }}min
-
{{ .FuzzyWordCount }}wrds
</div> </div>
{{ .Content }} {{ .Content }}
</article> </article>