1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-17 17:57:04 +01:00

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
This commit is contained in:
Alan Orth 2016-09-14 23:39:39 +03:00
parent 42c06c260c
commit d31626c5a3
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -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 }}