From 1e8d1ff9941d706e8c59636b7555f57838ce5c70 Mon Sep 17 00:00:00 2001 From: Mivinci <1366723936@qq.com> Date: Fri, 29 Oct 2021 16:58:33 +0800 Subject: [PATCH] option to hide date in posts --- exampleSite/config.toml | 2 +- layouts/_default/single.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9b4c7b8..6c28472 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -33,7 +33,7 @@ timeformat = "Jan 2, 2006" # switch for turning on/off lights. switch = ["🌚", "🌝"] # if true, date of posts will be displayed in the homepage. -displayDate = true +displayDate = false # if true, users can select text from your post. selectable = false diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 663b5d8..cd4c154 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,7 +5,9 @@

{{ .Title }}

+ {{ if .Site.Params.displayDate }} Posted at — {{ dateFormat .Site.Params.timeformat .Date }} + {{ end }} {{ if .Draft }} DRAFT