Implement the first generic JSON output testcase

This commit is contained in:
Bjørn Erik Pedersen
2017-03-08 13:45:33 +01:00
parent 3ec5fc3504
commit c8fff9501d
13 changed files with 188 additions and 56 deletions

View File

@@ -548,7 +548,10 @@ func (s *Site) preparePagesForRender(cfg *BuildCfg) {
p.Content = helpers.BytesToHTML(workContentCopy)
}
p.outputTypes = defaultOutputDefinitions.ForKind(p.Kind)
// May have been set in front matter
if len(p.outputTypes) == 0 {
p.outputTypes = defaultOutputDefinitions.ForKind(p.Kind)
}
//analyze for raw stats
p.analyzePage()