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

10 lines
387 B
HTML

<div class="p-4">
<h4 class="font-italic">Archives</h4>
<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>