add frontmatter to options
parent
b984437b2b
commit
b00061a9b2
|
@ -44,6 +44,14 @@ func Parse(c *caddy.Controller) ([]Config, error) {
|
||||||
}
|
}
|
||||||
cfg.PathScope = c.Val()
|
cfg.PathScope = c.Val()
|
||||||
cfg.PathScope = strings.TrimSuffix(cfg.PathScope, "/")
|
cfg.PathScope = strings.TrimSuffix(cfg.PathScope, "/")
|
||||||
|
case "frontmatter":
|
||||||
|
if !c.NextArg() {
|
||||||
|
return configs, c.ArgErr()
|
||||||
|
}
|
||||||
|
cfg.FrontMatter = c.Val()
|
||||||
|
if cfg.FrontMatter != "yaml" && cfg.FrontMatter != "json" && cfg.FrontMatter != "toml" {
|
||||||
|
return configs, c.Err("frontmatter type not supported")
|
||||||
|
}
|
||||||
case "on":
|
case "on":
|
||||||
if !c.NextArg() {
|
if !c.NextArg() {
|
||||||
return configs, c.ArgErr()
|
return configs, c.ArgErr()
|
||||||
|
|
Loading…
Reference in New Issue