Skip to content

Commit

Permalink
feat: allow hiding carousel on homepage by setting hb.blog.home.featu…
Browse files Browse the repository at this point in the history
…red_posts as 0
  • Loading branch information
razonyang committed Dec 16, 2023
1 parent e1ace96 commit aa81cc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion layouts/partials/hb/modules/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{{- $pages = where $pages "Section" "in" . }}
{{- end }}
{{- $pinnedPos := default "" site.Params.hb.blog.home.pinned_posts_position }}
{{- $featuredCount := default 10 site.Params.hb.blog.home.featured_posts }}
{{- $featuredCount := 10 }}
{{- if isset site.Params.hb.blog.home "featured_posts" }}
{{- $featuredCount = site.Params.hb.blog.home.featured_posts }}
{{- end }}
{{- $featuredPages := first $featuredCount (where $pages ".Params.featured" true) }}
{{- if $featuredPages }}
<div class="row">
Expand Down

0 comments on commit aa81cc0

Please sign in to comment.