diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 65a86e7..136b563 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -16,7 +16,8 @@
- {{ $paginator := .Paginate (where .Site.RegularPages "Section" "posts") }} + {{ $section := or .Section "posts" }} + {{ $paginator := .Paginate (where .Site.RegularPages "Section" $section) }} {{ range $paginator.Pages }} {{ partial "card.html" . }} {{ end }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index d57de4e..a1d3f81 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -33,11 +33,12 @@
-

{{i18n "recentArticles"}}

+

{{i18n "recentArticles"}}

    - {{ range first 3 (where .Site.RegularPages "Section" "posts") }} + {{ $section := or .Section "posts" }} + {{ range first 20 (where .Site.RegularPages "Section" $section) }}
  • {{ .Title }}