diff options
author | Sascha Brendel <mail@lednerb.eu> | 2020-08-14 21:08:31 +0300 |
---|---|---|
committer | Sascha Brendel <mail@lednerb.eu> | 2020-08-14 21:08:31 +0300 |
commit | af5754d854eea8efac61bdc4b82d52f67bc4e398 (patch) | |
tree | 331352d19356477a507483e4bb81f303213b3690 | |
parent | 9418144615fbe6bf4f3de3c7dbeeac8aa6c8a686 (diff) |
Fixed bug with rendering latest posts.
-rw-r--r-- | layouts/partials/footer.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 106562f..72ccca8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,10 +6,11 @@ <div class="recent-posts"> <strong>{{ i18n "latestPosts" }}</strong> <ul> - {{ range where (where (first (.Site.Params.amountLatestPostsInFooter | default 7) .Site.Pages.ByPublishDate.Reverse) ".Kind" "page") ".Type" "ne" "page" }} - <li> - <a href="{{ .Permalink }}">{{ .Title }}</a> - </li> + {{ $dontRender := (slice "page" "quote" "link" "status") }} + {{ range (first (.Site.Params.amountLatestPostsInFooter | default 7) (where (where .Site.Pages.ByPublishDate.Reverse ".Kind" "page") ".Type" "not in" $dontRender )) }} + <li> + <a href="{{ .Permalink }}">{{ .Title }}</a> + </li> {{ end }} </ul> </div> |