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

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/create
diff options
context:
space:
mode:
Diffstat (limited to 'create')
-rw-r--r--create/content.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/create/content.go b/create/content.go
index c3c1747a2..98b3652a4 100644
--- a/create/content.go
+++ b/create/content.go
@@ -81,6 +81,10 @@ func NewContent(kind, name string) (err error) {
return false
}
+ if newmetadata == nil {
+ newmetadata = make(map[string]interface{})
+ }
+
if !caseimatch(newmetadata, "date") {
newmetadata["date"] = time.Now()
}