♻️ Move homepage recent articles to partial

This commit is contained in:
James Panther
2021-08-18 14:35:54 +10:00
parent 7030022620
commit 139706895c
13 changed files with 35 additions and 29 deletions
+6
View File
@@ -0,0 +1,6 @@
{{ if .Site.Params.homepage.showRecent | default false }}
<h2 class="mt-8 text-2xl font-extrabold">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
{{ range first 5 (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.homepage.mainSections)).Pages }}
{{ partial "article-link.html" . }}
{{ end }}
{{ end }}