diff --git a/config.toml b/config.toml index 8a472bb..b0ba000 100644 --- a/config.toml +++ b/config.toml @@ -9,3 +9,7 @@ path = "github.com/hugomods/images" [params.bootstrap.config_toggle] langs = ["toml", "yaml", "json"] + +[params.bootstrap.article_cards] +limit = 12 +image_height = 240 \ No newline at end of file diff --git a/layouts/partials/bootstrap/article-cards.html b/layouts/partials/bootstrap/article-cards.html index 63e79c1..a90ee00 100644 --- a/layouts/partials/bootstrap/article-cards.html +++ b/layouts/partials/bootstrap/article-cards.html @@ -1,9 +1,9 @@ {{- $summaryLen := 120 }} -{{- $limit := 12 }} +{{- $limit := default 12 site.Params.bootstrap.article_cards.limit }} {{- $sections := slice }} {{- $linkText := i18n "read_more" }} {{- $itemAttrs := slice }} -{{- $imgHeight := 240 }} +{{- $imgHeight := default 240 site.Params.bootstrap.article_cards.image_height }} {{- $imgPlaceholder := "NO IMAGE" }} {{- if .IsNamedParams }} {{- with .Get "limit" }}{{ $limit = . }}{{ end }}