Skip to content

Commit

Permalink
Fix layout files using mainSections
Browse files Browse the repository at this point in the history
  • Loading branch information
martignoni committed Aug 16, 2019
1 parent fd958d7 commit aaeaad5
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 @@ -9,7 +9,7 @@

{{ define "main" }}

{{ $paginator := .Paginate (where .Site.RegularPages "Type" "posts") }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{- partial "page-summary" . -}}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/widgets/recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section id="recent-posts" class="widget widget_recent_entries">
<h2 class="widget-title">{{ i18n "recentPosts" }}</h2>
<ul>
{{ $recent := first 5 (where .Site.RegularPages "Section" "posts") }}
{{ $recent := first 5 (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ range $recent }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
Expand Down

0 comments on commit aaeaad5

Please sign in to comment.