blob: a6240be9c9734ad372e91b15cd5df5950310653b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{{ $num_recent_posts := default 5 .Site.Params.sidebar.num_recent_posts }}
{{ $posts := first $num_recent_posts (where .Site.Pages "Section" "in" .Site.Params.mainSections) }}
{{ if gt (len $posts) 0 }}
<section>
<h4>{{ i18n "recentPosts" }}</h4>
<ol class="list-unstyled blog__recents">
{{ range first 2 $posts }}
<li>
<a href="{{.RelPermalink}}">{{.Title | markdownify }}</a>
</li>
{{ end }}
</ol>
</section>
{{ end }}
|