fix: recent posts

This commit is contained in:
2025-03-12 22:42:42 +00:00
parent af0eacefe2
commit 1b5ff4d378
2 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,9 @@
<div class="aside__content">
{{- block "aside" . }}{{- end }}{{partial "allTags.html" . -}}
</div>
<div class="aside__content">
{{- block "aside" . }}{{- end }}{{partial "recentPosts.html" . -}}
</div>
</section>
<footer class="page__footer">{{- partial "footer.html" . -}}</footer>

View File

@ -0,0 +1,6 @@
<h2>Recent Posts</h2>
<ul>
{{ range first 5 (where site.RegularPages "Section" "blog") }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ if .Date }}<p>{{ .Date.Format "2006-01-02" }}</p>{{ end }}</li>
{{ end }}
</ul>