diff options
-rw-r--r-- | layouts/partials/sidebar.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index c0968b8..d115252 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -66,14 +66,16 @@ <section class="even"> <h1>Recent Posts</h1> <ul id="recent_posts"> - {{ range first . $.Site.Pages }} - <li class="post"> - <a href="{{ .RelPermalink }}">{{ .Title }}</a> - </li> + {{ $pages := where $.Site.Pages "Type" "post" }} + {{ range first . $pages }} + {{ if .IsPage }} + <li class="post"> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} {{ end }} </ul> </section> {{ end }} {{ end }} - </aside> |