option to hide date in posts

This commit is contained in:
Mivinci 2021-10-29 16:58:33 +08:00
parent 458b7c3904
commit 1e8d1ff994
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -5,7 +5,9 @@
<h1 class="mt-8 mb-6">{{ .Title }}</h1>
<div class="mb-3 text-xs flex justify-between sm:flex-col">
<div>
{{ if .Site.Params.displayDate }}
Posted at &mdash; {{ dateFormat .Site.Params.timeformat .Date }}
{{ end }}
{{ if .Draft }}
<span class="ml-3 tag">
DRAFT