Skip to content

Commit

Permalink
feat: customisable main section
Browse files Browse the repository at this point in the history
Close #1070
  • Loading branch information
HEIGE-PCloud committed Oct 5, 2023
1 parent ac6270f commit fffeb50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{- /* Posts */ -}}
{{- if ne $posts.enable false | and .Site.RegularPages -}}
{{- /* Paginate */ -}}
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
{{- $pages := where .Site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- if .Site.Params.page.hiddenFromHomePage -}}
{{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
{{- else -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
{{- range where .Site.RegularPages "Type" "in" site.Params.mainSections | first (.Site.Params.home.rss | default 10) -}}
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
{{- end -}}
</channel>
Expand Down

1 comment on commit fffeb50

@vercel
Copy link

@vercel vercel bot commented on fffeb50 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.