mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
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.
This commit is contained in:
parent
08219161dd
commit
088d46a804
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ func NewContent(kind, name string) (err error) {
|
||||||
return err
|
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)
|
newmetadata["date"] = time.Now().Format(time.RFC3339)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue