mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2025-03-15 20:18:52 +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
layouts
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue