This commit is contained in:
Henrique Dias
2017-01-18 18:21:04 +00:00
parent 022891e51e
commit 91a6848586
2 changed files with 3 additions and 10 deletions

View File

@@ -158,15 +158,8 @@ func parse(c *caddy.Controller, root string) (*Config, *filemanager.FileManager,
fm = &filemanager.FileManager{Configs: fmConfig}
fm.Configs[0].HugoEnabled = true
format := getFrontMatter(cfg)
cfg.WebDavURL = fm.Configs[0].WebDavURL
for _, user := range fm.Configs[0].Users {
user.FrontMatter = format
}
if err != nil {
return cfg, fm, err
}
@@ -210,7 +203,7 @@ func getFrontMatter(conf *Config) string {
log.Println(err)
fmt.Printf("Can't get the default frontmatter from the configuration. %s will be used.\n", format)
} else {
bytes = frontmatter.AppendRune(bytes, format)
bytes = frontmatter.AppendRune(bytes, frontmatter.StringFormatToRune(format))
f, err := frontmatter.Unmarshal(bytes)
if err != nil {