From 32e4690938851684558768be6b3b68911f327536 Mon Sep 17 00:00:00 2001 From: v1ne Date: Tue, 19 Nov 2019 22:15:49 +0100 Subject: [PATCH] article: Add a way to suppress the date This is handly if an article is just an overview page or a list of subpages. --- README.md | 8 ++++++++ layouts/partials/article.html | 2 ++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index f19f6af..90e53d1 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,14 @@ katex = true +++ ``` +### Suppress date in an article +Hide the date from an article, e.g. because it's just an index: +``` ++++ +omitDate = true ++++ +``` + ## Contributing 1. Fork it! diff --git a/layouts/partials/article.html b/layouts/partials/article.html index 57ca6a0..d69fd3a 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -6,9 +6,11 @@ {{ end }}
+ {{- if not .Params.omitDate }} + {{ end -}} {{ $Site := .Site }} {{ if .Params.categories }}