feat: latest posts on the home card
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04a09961e7
commit
bb26176277
4 files changed
+39
No files matched your search
@@ -32,6 +32,21 @@
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ $posts := first 3 (where site.RegularPages "Section" "in" site.Params.mainSections).ByDate.Reverse }}
|
||||
{{ with $posts }}
|
||||
<h2 class="vcard__heading">{{ i18n "recentPosts" }}</h2>
|
||||
<ul class="vcard__posts">
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<span class="vcard__post-title">{{ .Title }}</span>
|
||||
<time class="vcard__post-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format site.Params.dateFormat }}</time>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ with $p.more }}<a class="vcard__more" href="{{ . | relLangURL }}">{{ i18n "moreAboutMe" }}</a>{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
Reference in new issue
Block a user