Browse Source

Fix inclusion of other page types under "latest posts"

With Hugo 0.18 everything has become a page of a certain *kind*.
The "latest posts" section ranges over all pages but didn't exclude
those that were not of the kind "page".
master
digitalcraftsman 8 years ago
parent
commit
60429682f7
  1. 4
      layouts/partials/latest-posts.html

4
layouts/partials/latest-posts.html

@ -1,6 +1,8 @@
<ul id="post-list" class="archive readmore">
<h3>{{ with .Site.Params.readMore }}{{ . }}{{ else }}Read more{{ end }}</h3>
{{ range first 10 (where .Site.Pages "Params.hidden" "ne" "true") }}
{{ $pages := where .Site.Pages "Kind" "page" }}
{{ range first 10 (where $pages "Params.hidden" "ne" "true") }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if and (ne $url "about/") }}
<li>

Loading…
Cancel
Save