Skip to content

Commit 3c9c6e8

Browse files
committed
fix: pinned posts on blog section
1 parent ef4083c commit 3c9c6e8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

layouts/_default/blog.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{{- define "title" }}
2+
{{- $pages := site.RegularPages }}
3+
{{- with (default site.Params.hb.blog.home.main_sections .Params.main_sections) }}
4+
{{- $pages = where $pages "Section" "in" . }}
5+
{{- end }}
6+
{{- $pinned := first (default 1 .Site.Params.hb.blog.list_pinned_posts) (where $pages ".Params.pinned" true) }}
7+
{{- $pages = union $pinned $pages }}
8+
{{- $paginator := .Paginate $pages (default 12 .Site.Params.hb.blog.paginate) }}
29
{{ partial "hb/modules/blog/title" . }}
310
{{- end -}}
411

0 commit comments

Comments
 (0)