mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-10 07:19:44 +00:00
Fix for blog posts ordered by date as of Hugo v0.31.
This commit is contained in:
parent
423d2dbe89
commit
ce5aaa6267
2 changed files with 4 additions and 4 deletions
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue