fix: recent posts
This commit is contained in:
@ -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>
|
||||
|
6
layouts/partials/recentPosts.html
Normal file
6
layouts/partials/recentPosts.html
Normal 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>
|
Reference in New Issue
Block a user