Skip to content

Commit

Permalink
Merge pull request #16 from ii/explicit-ordering
Browse files Browse the repository at this point in the history
sort blog posts by date, descending
  • Loading branch information
cooldracula authored Dec 18, 2023
2 parents b41a3f3 + e3a2f3b commit 88ebd3d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions themes/ii/layouts/post/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ define "main" }}

<div class="content center-column">
<h1 class="section-title">{{ .Title }}</h1>

{{ .Content | emojify }}
<ul class="post-list">
{{ range .Pages.ByDate.Reverse }}
<li class="post-list__item">
<a href="{{ .RelPermalink }}" class="post-title">{{ .Title }}</a>
<div class="post-metadata">
<span class="divider">//</span>
{{ range .Param "author" }}
<a class="post-author" href={{(path.Join "/team" (replace (lower .) " " "-"))}}>
{{ . }}
</a>
{{ end }}
<span class="divider">//</span>
<span class='post-date'>{{ .Date.Format ( .Site.Params.dateformat | default "Jan 2, 2006") }}</span>
</div>
</li>
{{ end }}
</ul>
</div>
{{ end }}

0 comments on commit 88ebd3d

Please sign in to comment.