1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-21 10:02:17 +01:00
hugo-theme-bootstrap4-blog/layouts/_default/list.html
Alan Orth d31626c5a3
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
2016-09-14 23:39:39 +03:00

10 lines
217 B
HTML

{{ define "main" }}
{{ $num_recent_posts := .Site.Params.num_recent_posts | default "5" }}
{{ range first $num_recent_posts (where .Data.Pages "Type" "post") }}
{{ .Render "summary"}}
{{ end }}
{{ end }}