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

github.com/spookey/slick.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrieder Griesshammer <frieder.griesshammer@der-beweis.de>2021-06-20 13:50:13 +0300
committerFrieder Griesshammer <frieder.griesshammer@der-beweis.de>2021-06-20 13:50:13 +0300
commit57d31a470a337624eab8a73fc4f003f5a3076e3b (patch)
treed1d83571e991bd0d3b349813f73b9bfd9445990e
parentdc5a054a1404d385aa7596e0fbed8afe030db516 (diff)
Introduce showMeta setting to hide all information in single view
-rw-r--r--CHANGELOG.md5
-rw-r--r--_sites/changelog/config.yaml3
-rw-r--r--_sites/example/config.toml3
-rw-r--r--_sites/example/content/slick_showcase.md3
-rw-r--r--layouts/_default/single.html3
5 files changed, 17 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5ac144c..48a2796 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,11 @@ and this project adheres to
## [Unreleased]
+### Added
+
+- Added setting ``showMeta`` which allows hiding the title, date and meta info
+ of posts in single view.
+
### Changed
- Reformatted all `.md` files so markdown lint should not report any issues.
diff --git a/_sites/changelog/config.yaml b/_sites/changelog/config.yaml
index 40ab555..b85b1ee 100644
--- a/_sites/changelog/config.yaml
+++ b/_sites/changelog/config.yaml
@@ -63,6 +63,9 @@ params:
# If false no pagination is shown when there is nothing to paginate
showEmptyPagination: false
+ # If false the title, dates and taxonomy are not shown on single view
+ showMeta: true
+
# If false the dates for the posts are not shown
showMetaDates: false
diff --git a/_sites/example/config.toml b/_sites/example/config.toml
index 7061265..a1a3796 100644
--- a/_sites/example/config.toml
+++ b/_sites/example/config.toml
@@ -63,6 +63,9 @@ paginatePath = "page"
# If false no pagination is shown when there is nothing to paginate
showEmptyPagination = true
+ # If false the title, dates and taxonomy are not shown on single view
+ showMeta = true
+
# If false the dates for the posts are not shown
showMetaDates = true
diff --git a/_sites/example/content/slick_showcase.md b/_sites/example/content/slick_showcase.md
index b611b9b..7722637 100644
--- a/_sites/example/content/slick_showcase.md
+++ b/_sites/example/content/slick_showcase.md
@@ -16,6 +16,9 @@ tags:
- themes
series:
- Slick
+showmeta: true
+showmetadates: true
+showmetalinks: true
---
This is some example page to show some supported markup for the
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index f8f23ef..f17531e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,5 +1,7 @@
{{- define "main" }}
+{{- $showmeta := default (default true $.Site.Params.showMeta) .Params.showmeta }}
<div>
+ {{- if $showmeta }}
<div>
<h2 class="post-title">
{{ if .Draft }}DRAFT: {{ end }}
@@ -7,6 +9,7 @@
</h2>
{{ partial "post_meta.html" . }}
</div>
+ {{- end }}
<div>
{{ .Content }}
</div>