Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/geschke/hugo-tikva.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Geschke <ralf@kuerbis.org>2018-11-21 13:17:04 +0300
committerRalf Geschke <ralf@kuerbis.org>2018-11-21 13:17:04 +0300
commit4021ab48debc36b0d4b5d89970820ae12084b834 (patch)
treef498c6fa1d458e2ea76975455e894df204d01be3
parentea7ccc1c5d02f68054513db634acb1802648664a (diff)
parent9541d62c2af57339757f081df5d2fec6f1a367f7 (diff)
Merge branch 'master' of github.com:geschke/hugo-tikvav0.1
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/single.html8
2 files changed, 6 insertions, 6 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 5c9a237..6146995 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -28,8 +28,8 @@ paginate = 2
subtitle = "Example of Subtitle"
dateFormat = "02.01.2006" # Format dates with Go's time formatting
- showDate = true # Show date on summaries. This is a global setting. If the date should be shown, you have to add a "date" parameter to the content files, otherwise the default value will be used, which is something you don't want.
- showNumberOfWords = true # Show number of word on article header
+ showDate = true # true|false: Show date on summaries. This is a global setting. If the date should be shown, you have to add a "date" parameter to the content files, otherwise the default value will be used, which is something you don't want.
+ showNumberOfWords = false # true|false: Show number of word on article header of single content page
# Navigation bar settings
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index ef1ef63..2cc83cf 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,14 +2,14 @@
{{ $dateFormat := default "Mon Jan 2, 2006" .Site.Params.DateFormat }}
{{ $author := .Params.author | default .Site.Params.author }}
-
+{{ $showNumberOfWords := .Params.ShowNumberOfWords | default .Site.Params.ShowNumberOfWords }}
<h1>{{ .Title }}</h1>
-{{ if not .Params.HideMeta }}
+
<div class="post-meta">{{ if .Site.Params.ShowDate }}<span class="byline-icon fa fa-clock-o" aria-hidden="true"></span> <span class="screen-reader-text">{{ i18n "date" }}: </span><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format $dateFormat }}</time> - {{ end }}{{ if $author }}
<span class="byline-icon fa fa-user" aria-hidden="true"></span><span class="screen-reader-text">{{ i18n "author" }}: </span> {{ $author }} - {{ end }}
- {{ .FuzzyWordCount }} {{ i18n "words" }} </div>
-{{ end }}
+ {{ if $showNumberOfWords }}{{ .FuzzyWordCount }} {{ i18n "words" }}{{ end }} </div>
+
{{ .Content }}
{{ end }} \ No newline at end of file