From d31626c5a37de26fbf6922fad46f6d2ae2d09ed9 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 14 Sep 2016 23:39:39 +0300 Subject: [PATCH] layouts/_default/list.html: Check for page type instead of "section" Both work effectively the same for my use case, but the "type" is more obvious when looking at the code. See the documentation for Hugo's page variables for more info[0]. [0] http://gohugo.io/templates/variables/#page-variables --- layouts/_default/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b93a063..2653a19 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,7 +2,7 @@ {{ $num_recent_posts := .Site.Params.num_recent_posts | default "5" }} - {{ range first $num_recent_posts (where .Data.Pages "Section" "post") }} + {{ range first $num_recent_posts (where .Data.Pages "Type" "post") }} {{ .Render "summary"}} {{ end }}