Fix for issue #9

Added section qualifier for Latest Post
This commit is contained in:
Vicky 2017-06-01 12:39:04 +08:00
parent 2e01da3ccd
commit 27921af8f3
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@
{{ if .Site.Params.showlatest }}
<h2 class="title is-2 top-pad">Latest Post</h2>
{{ range first 1 .Data.Pages.ByPublishDate }}
{{ range first 1 (where .Data.Pages.ByPublishDate "Section" "blog") }}
<div class="summary">{{ .Date.Format .Site.Params.dateform }}
<h3 class="title is-3 strong-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<div class="markdown">

View file

@ -2,7 +2,7 @@
{{ if .Site.Params.showlatest }}
<h2 class="title is-2 has-text-centered">Latest Post</h2>
{{ range first 1 .Data.Pages.ByPublishDate }}
{{ range first 1 (where .Data.Pages.ByPublishDate "Section" "blog") }}
<div class="summary">{{ .Date.Format .Site.Params.dateform }}
<h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<div class="markdown">