Add MediaType and a crude implementation

See #2828
This commit is contained in:
Bjørn Erik Pedersen
2017-03-02 15:35:25 +01:00
parent 9262c5b32f
commit c4989c39f1
4 changed files with 106 additions and 13 deletions

View File

@@ -548,6 +548,13 @@ func (s *Site) preparePagesForRender(cfg *BuildCfg) {
p.Content = helpers.BytesToHTML(workContentCopy)
}
// TODO(bep) output this is temporary
if p.IsNode() && p.Kind != KindTaxonomyTerm {
p.mediaTypes = mediaTypesWithRSS
} else {
p.mediaTypes = mediaTypesHTML
}
//analyze for raw stats
p.analyzePage()