Fix inconsistent front matter handling

Fixes #768
This commit is contained in:
Bjørn Erik Pedersen
2015-07-26 15:28:56 +02:00
parent 81e69c416d
commit 3037d200cb
2 changed files with 130 additions and 1 deletions

View File

@@ -543,7 +543,9 @@ func (p *Page) update(f interface{}) error {
case []interface{}:
if len(vvv) > 0 {
switch vvv[0].(type) {
case map[interface{}]interface{}: // Proper parsing structured array from yaml based FrontMatter
case map[interface{}]interface{}: // Proper parsing structured array from YAML based FrontMatter
p.Params[loki] = vvv
case map[string]interface{}: // Proper parsing structured array from JSON based FrontMatter
p.Params[loki] = vvv
default:
a := make([]string, len(vvv))