diff --git a/layouts/partials/sections/recent-posts.html b/layouts/partials/sections/recent-posts.html index 937bdff..9491977 100644 --- a/layouts/partials/sections/recent-posts.html +++ b/layouts/partials/sections/recent-posts.html @@ -3,13 +3,19 @@ {{ $sectionID = .section.id }} {{ end }} +{{ $numShow := 3}} +{{ if .section.numShow }} + {{ $numShow = .section.numShow }} +{{ end }} + +
{{ if not (.section.hideTitle) }}

{{ .section.name }}

{{ end }}
- {{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}} + {{ range first $numShow (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}} {{ partial "cards/recent-post.html" . }} {{ end }}