Skip to content

Commit 62a8b18

Browse files
committed
feat: add the main_section page parameter for home and list page, which has higher priority than blog.home.main_sections
1 parent f2e5e30 commit 62a8b18

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

layouts/_default/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- define "title" }}
22
{{- $pages := site.RegularPages }}
3-
{{- with site.Params.hb.blog.home.main_sections }}
3+
{{- with (default site.Params.hb.blog.home.main_sections .Params.main_sections) }}
44
{{- $pages = where $pages "Section" "in" . }}
55
{{- end }}
66
{{- $pinned := first 1 (where $pages ".Params.pinned" true) }}

layouts/partials/hb/modules/blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- $pages := site.RegularPages }}
2-
{{- with site.Params.hb.blog.home.main_sections }}
2+
{{- with (default site.Params.hb.blog.home.main_sections .Params.main_sections) }}
33
{{- $pages = where $pages "Section" "in" . }}
44
{{- end }}
55
{{- $pinnedPos := default "" site.Params.hb.blog.home.pinned_posts_position }}

layouts/partials/hb/modules/blog/title.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- $pages := site.RegularPages }}
2-
{{- with site.Params.hb.blog.home.main_sections }}
2+
{{- with (default site.Params.hb.blog.home.main_sections .Params.main_sections) }}
33
{{- $pages = where $pages "Section" "in" . }}
44
{{- end }}
55
{{- $paginator := .Paginate $pages site.Params.hb.blog.paginate }}

0 commit comments

Comments
 (0)