diff --git a/config.toml b/config.toml index 5476f9cf..a4e0a0b8 100644 --- a/config.toml +++ b/config.toml @@ -11,6 +11,7 @@ color = "auto" customCSS = [] customJS = [] diagram = false +carouselPostCount = 5 featuredPostCount = 5 fixedHeader = true fullWidth = false diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html index 9aebfe58..69779ffb 100644 --- a/layouts/partials/carousel.html +++ b/layouts/partials/carousel.html @@ -1,4 +1,5 @@ -{{- $pages := first 3 (where $.Site.Pages "Params.carousel" true) }} +{{- $count := default 5 site.Params.carouselPostCount }} +{{- $pages := first $count (where $.Site.Pages "Params.carousel" true) }} {{- if and .IsHome $pages (eq .Paginator.PageNumber 1) }}