summaryrefslogtreecommitdiffhomepage
path: root/create/content.go
diff options
context:
space:
mode:
authorAnthony Fok <[email protected]>2015-02-08 09:50:01 -0700
committerAnthony Fok <[email protected]>2015-02-08 09:55:20 -0700
commit088d46a804fc9345203fdcf90964b195775fa0e0 (patch)
tree2f16a2f093ac3dcdd589d0462416289d5bc855ee /create/content.go
parent08219161dd48d952085dd2e421dc7b005319684c (diff)
downloadhugo-088d46a804fc9345203fdcf90964b195775fa0e0.tar.gz
hugo-088d46a804fc9345203fdcf90964b195775fa0e0.zip
parser.FormatSanitize() MetaDataFormat for date too
So that the date would come out correctly with variations like `MetaDataFormat = "YAML"` in addition to the normally expected `MetaDataFormat = "yaml"`. Fixes #865.
Diffstat (limited to 'create/content.go')
-rw-r--r--create/content.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/create/content.go b/create/content.go
index 98b3652a4..fa37f2666 100644
--- a/create/content.go
+++ b/create/content.go
@@ -98,7 +98,7 @@ func NewContent(kind, name string) (err error) {
return err
}
- if x := viper.GetString("MetaDataFormat"); x == "json" || x == "yaml" || x == "toml" {
+ if x := parser.FormatSanitize(viper.GetString("MetaDataFormat")); x == "json" || x == "yaml" || x == "toml" {
newmetadata["date"] = time.Now().Format(time.RFC3339)
}