shithub: hugo

Download patch

ref: ebf677a58360126d8b9a1e98d086aa4279f53181
parent: 58d9cbd31bcf7c296a39860fd7e566d10faaff28
author: Bjørn Erik Pedersen <[email protected]>
date: Thu May 4 15:14:43 EDT 2017

hubolib: Embed Page in WeightedPage

People can still say `.Page`, but by embedding it `WeightedPages` can be used interchangeably with `Pages` in templates.

Fixes #3435

--- a/hugolib/taxonomy.go
+++ b/hugolib/taxonomy.go
@@ -39,7 +39,7 @@
 // A WeightedPage is a Page with a weight.
 type WeightedPage struct {
 	Weight int
-	Page   *Page
+	*Page
 }
 
 func (w WeightedPage) String() string {