mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
d6093aba4d
commit
d8923eb676
2 changed files with 12 additions and 10 deletions
|
@ -52,12 +52,13 @@ func InterfaceToConfig(in interface{}, mark rune, w io.Writer) error {
|
||||||
return err
|
return err
|
||||||
|
|
||||||
case rune(TOMLLead[0]):
|
case rune(TOMLLead[0]):
|
||||||
tree := toml.TreeFromMap(in.(map[string]interface{}))
|
tree, err := toml.TreeFromMap(in.(map[string]interface{}))
|
||||||
b := []byte(tree.String())
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
_, err := w.Write(b)
|
_, err = tree.WriteTo(w)
|
||||||
return err
|
return err
|
||||||
|
|
||||||
case rune(JSONLead[0]):
|
case rune(JSONLead[0]):
|
||||||
b, err := json.MarshalIndent(in, "", " ")
|
b, err := json.MarshalIndent(in, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -107,6 +108,7 @@ func InterfaceToFrontMatter(in interface{}, mark rune, w io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
err = InterfaceToConfig(in, mark, w)
|
err = InterfaceToConfig(in, mark, w)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
12
vendor/vendor.json
vendored
12
vendor/vendor.json
vendored
|
@ -208,16 +208,16 @@
|
||||||
"revisionTime": "2016-07-26T15:08:25Z"
|
"revisionTime": "2016-07-26T15:08:25Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "8Y05Pz7onrQPcVWW6JStSsYRh6E=",
|
"checksumSHA1": "F1IYMLBLAZaTOWnmXsgaxTGvrWI=",
|
||||||
"path": "github.com/pelletier/go-buffruneio",
|
"path": "github.com/pelletier/go-buffruneio",
|
||||||
"revision": "df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d",
|
"revision": "c37440a7cf42ac63b919c752ca73a85067e05992",
|
||||||
"revisionTime": "2016-01-24T19:35:03Z"
|
"revisionTime": "2017-02-27T22:03:11Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "Ur3oHB8hzTudM8y0xHRoUXAf0IY=",
|
"checksumSHA1": "JzPq88RYNDhkMIiCkM0NDK+0HOI=",
|
||||||
"path": "github.com/pelletier/go-toml",
|
"path": "github.com/pelletier/go-toml",
|
||||||
"revision": "439fbba1f887c286024370cb4f281ba815c4c7d7",
|
"revision": "fee7787d3f811af92276f5ff10107092e95b7a1d",
|
||||||
"revisionTime": "2016-12-29T18:51:04Z"
|
"revisionTime": "2017-03-14T20:16:40Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "ynJSWoF6v+3zMnh9R0QmmG6iGV8=",
|
"checksumSHA1": "ynJSWoF6v+3zMnh9R0QmmG6iGV8=",
|
||||||
|
|
Loading…
Reference in a new issue