mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-24 21:20:17 +01:00
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.
This commit is contained in:
parent
a942707278
commit
f7b4f0a819
@ -1,6 +1,8 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ range .Data.Pages }}
|
||||
{{ $num_recent_posts := .Site.Params.num_recent_posts | default "5" }}
|
||||
|
||||
{{ range first $num_recent_posts .Data.Pages }}
|
||||
{{ .Render "summary"}}
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user