diff options
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
4 files changed, 6 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a4d18f4..98431c8 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -41,10 +41,12 @@ {{ if gt .Date 0001 }} <!-- If Date is set (greater than year 0001) --> <span class="entry-date date published updated"><time datetime="{{ .Date }}"><a href="{{ .RelPermalink }}">{{ .Date.Format "Jan 2, 2006" }}</a></time></span> {{ end }} + {{ if (.Params.reading_time | default true) }} <span class="entry-reading-time"> <i class="fa fa-clock-o"></i> Reading time ~{{ if le .ReadingTime 1 }}1 minute{{ else }}{{ .ReadingTime }} minutes{{ end }} </span><!-- /.entry-reading-time --> + {{ end }} </div><!-- /.entry-meta --> {{ if .Params.link }} <h1 class="entry-title"><a href="{{ .RelPermalink }}" class="permalink" rel="bookmark" title="{{ .Title }}"><i class="fa fa-bookmark"></i></a> <a href="{{ .Params.link }}">{{ .Title }}</a></h1> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b45d8a0..8342138 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -23,10 +23,12 @@ {{ if and (ne .Type "page") (gt .Date 0001) }} <!-- If Date is set (greater than year 0001) --> <h2><span class="entry-date date published"><time datetime="{{ .Date }}">{{ .Date.Format "January 2, 2006" }}</time></span></h2> {{ end }} + {{ if (.Params.reading_time | default true) }} <p class="entry-reading-time"> <i class="fa fa-clock-o"></i> Reading time ~{{ if le .ReadingTime 1 }}1 minute{{ else }}{{ .ReadingTime }} minutes{{ end }} </p><!-- /.entry-reading-time --> + {{ end }} </div><!-- /.header-title-wrap --> </header> <div class="entry-content"> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 608e39b..36c489a 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1 +1 @@ -<span>{{ .Site.Copyright }} Powered by <a href="https://gohugo.io/" rel="nofollow">Hugo</a> using the <a href="https://github.com/dldx/hpstr-hugo-theme" rel="nofollow">HPSTR</a> theme.</span> +<span>{{ .Site.Copyright }} Powered by <a href="https://gohugo.io/" rel="nofollow">Hugo</a> using the <a href="https://github.com/dldx/hpstr-hugo-theme" rel="nofollow">HPSTR theme</a>.</span> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 794128f..728afa6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,11 +10,10 @@ {{ if .IsHome }} {{ $.Scratch.Set "Params" .Site.Params }} {{ else if .IsNode }} - {{ $.Scratch.Set "Params" (index (.Site.Data.sections) (lower .Title)) }} + {{ $.Scratch.Set "Params" (index .Site.Data.sections (lower .Title)) }} {{ else }} {{ $.Scratch.Set "Params" .Params }} {{ end }} - {{ if .Params.tags }}<meta name="keywords" content="{{ delimit .Params.tags ", " }}">{{ end }} <!-- Open Graph and Twitter cards --> |