Fixed issue #15 (#16)

Fix for blog posts ordered by date as of Hugo v0.31.
This commit is contained in:
Pablo Martin Viva 2017-12-05 01:04:11 -03:00 committed by Vicky Lai
parent 423d2dbe89
commit ce5aaa6267
2 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@
{{ if .Site.Params.showlatest }}
<h2 class="title is-2 top-pad">Latest Post</h2>
{{ range first 1 (where .Data.Pages.ByPublishDate "Section" "blog") }}
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "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">
@ -63,4 +63,4 @@ $('a[href^="{{ .Permalink }}#"]').click(function(e) {
})
</script>
</body>
</body>

View file

@ -2,7 +2,7 @@
{{ if .Site.Params.showlatest }}
<h2 class="title is-2 has-text-centered">Latest Post</h2>
{{ range first 1 (where .Data.Pages.ByPublishDate "Section" "blog") }}
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "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">
@ -30,4 +30,4 @@
</div><!-- End Blog container -->
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>