diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-12-15 09:27:30 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-12-15 09:27:30 +0100 |
commit | ef03c6f95412494902aef40335d8666136fad558 (patch) | |
tree | a9f1910681f7a0903414d90f33f49ae169ae6350 /create/content.go | |
parent | e4ebe0d5bf9d25d7e30acd6fc18610d96abb3d6f (diff) | |
download | hugo-ef03c6f95412494902aef40335d8666136fad558.tar.gz hugo-ef03c6f95412494902aef40335d8666136fad558.zip |
create: Allow empty dates in archetype in new
To make it behave the same as Hugo 0.17.
Diffstat (limited to 'create/content.go')
-rw-r--r-- | create/content.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/create/content.go b/create/content.go index 08094f261..d939cb6bf 100644 --- a/create/content.go +++ b/create/content.go @@ -110,6 +110,9 @@ func createMetadata(archetype parser.Page, name string) (map[string]interface{}, var date time.Time for k, v := range metadata { + if v == "" { + continue + } lk := strings.ToLower(k) switch lk { case "date": |