hubolib: Refactor site rendering with an "output format context"

Fixes #3397
This commit is contained in:
Bjørn Erik Pedersen 2017-04-28 09:40:50 +02:00
parent 1d70aa9826
commit 1e4d082cf5
2 changed files with 43 additions and 2 deletions

View file

@ -81,6 +81,11 @@ func pageRenderer(s *Site, pages <-chan *Page, results chan<- error, wg *sync.Wa
pageOutput, err = page.mainPageOutput.copyWithFormat(outFormat)
}
if outFormat != page.s.rc.Format {
// Will be rendered ... later.
continue
}
if err != nil {
s.Log.ERROR.Printf("Failed to create output page for type %q for page %q: %s", outFormat.Name, page, err)
continue