diff options
Diffstat (limited to 'create')
-rw-r--r-- | create/content.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/create/content.go b/create/content.go index 1f198b5c6..01a1c9aac 100644 --- a/create/content.go +++ b/create/content.go @@ -90,6 +90,10 @@ func NewContent(kind, name string) (err error) { return err } + if x := viper.GetString("MetaDataFormat"); x == "json" || x == "yaml" { + newmetadata["date"] = time.Now().Format(time.RFC3339) + } + page.Dir = viper.GetString("sourceDir") page.SetSourceMetaData(newmetadata, parser.FormatToLeadRune(viper.GetString("MetaDataFormat"))) |