hugo-theme-bootstrap5-blog/layouts/partials/recent.html

10 lines
386 B
HTML
Raw Permalink Normal View History

2020-12-07 13:13:09 +01:00
<div class="p-4">
<h4 class="fst-italic">Archives</h4>
2020-12-07 13:13:09 +01:00
<ol class="list-unstyled mb-0">
{{ $num_recent_posts := (index .Site.Params.sidebar "num_recent_posts" | default 5) }}
{{ range first $num_recent_posts (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
<li><a href="{{.RelPermalink}}">{{.Title | markdownify }}</a></li>
{{ end }}
</ol>
</div>