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

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvvveiii <cntrump@gmail.com>2020-01-02 13:39:34 +0300
committervvveiii <cntrump@gmail.com>2020-01-02 13:39:34 +0300
commit9c2c59dffcfd641a0ce9a978e727b2f889012efe (patch)
tree45e36f7acf81d06fd2dd9c7b3367dbb05a56b1c6 /archetypes
parent3b406de2f4809fea3541a2a3d4ef873728cab959 (diff)
support custom date format
Diffstat (limited to 'archetypes')
-rw-r--r--archetypes/default.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
index 086fd2c..760f114 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,6 +1,8 @@
+{{- $dateFormat := .Site.Params.dateFormat -}}
+{{- if not $dateFormat -}}{{- $dateFormat = "2006-01-02" -}}{{- end -}}
+++
title = "{{ replace .Name `-` ` ` | title }}"
-date = {{ now.Format "2006-01-02" }}
+date = "{{ now.Format $dateFormat }}"
tags = []
categories = []
imgs = []