mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
sanity: move from json to yaml
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
package hugolib
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"launchpad.net/goyaml"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@@ -55,7 +55,7 @@ func SetupConfig(cfgfile *string, path *string) *Config {
|
||||
|
||||
file, err := ioutil.ReadFile(configPath)
|
||||
if err == nil {
|
||||
if err := json.Unmarshal(file, &c); err != nil {
|
||||
if err := goyaml.Unmarshal(file, &c); err != nil {
|
||||
fmt.Printf("Error parsing config: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user