From b00061a9b212768f9c4cbd3c683aab133896e080 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 29 Jun 2016 10:43:13 +0100 Subject: [PATCH] add frontmatter to options --- config/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/config.go b/config/config.go index 8be748a3..479fc11e 100644 --- a/config/config.go +++ b/config/config.go @@ -44,6 +44,14 @@ func Parse(c *caddy.Controller) ([]Config, error) { } cfg.PathScope = c.Val() 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": if !c.NextArg() { return configs, c.ArgErr()