hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit ebf677a58360126d8b9a1e98d086aa4279f53181
parent 58d9cbd31bcf7c296a39860fd7e566d10faaff28
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Thu,  4 May 2017 19:14:43 +0200

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

Diffstat:
Mhugolib/taxonomy.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hugolib/taxonomy.go b/hugolib/taxonomy.go
@@ -39,7 +39,7 @@ type WeightedPages []WeightedPage
 // A WeightedPage is a Page with a weight.
 type WeightedPage struct {
 	Weight int
-	Page   *Page
+	*Page
 }
 
 func (w WeightedPage) String() string {