mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
create: Allow empty dates in archetype in new
To make it behave the same as Hugo 0.17.
This commit is contained in:
@@ -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":
|
||||
|
Reference in New Issue
Block a user