hugolib, output: Restrict Render to regular Pages

Using it for list pages doesn't work and has potential weird side-effects.

The user probably meant to range over .Site.ReqularPages, and that is now marked clearly in the log.
This commit is contained in:
Bjørn Erik Pedersen
2017-03-26 19:34:30 +02:00
parent e49a2b83ad
commit 930a3df1b7
6 changed files with 50 additions and 16 deletions

View File

@@ -1668,7 +1668,7 @@ func (s *Site) kindFromSections(sections []string) string {
return KindSection
}
func (s *Site) layouts(p *PageOutput) []string {
func (s *Site) layouts(p *PageOutput) ([]string, error) {
return s.layoutHandler.For(p.layoutDescriptor, "", p.outputFormat)
}