1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00
hugo-theme-bootstrap4-blog/layouts/_default/list.html
Alan Orth f7b4f0a819
Allow configuration of how many posts to show on the homepage
You can set this property in your site's config to override:

  [params]
  num_recent_posts = 7

Defaults to five (5) if unset.
2016-09-03 20:21:40 +03:00

10 lines
195 B
HTML

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