website/layouts/shortcodes/homepage/posts.html
2021-01-22 05:07:48 +08:00

11 lines
397 B
HTML

{{- $pages := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{- $limit := cond (ge $.Site.Config.Services.RSS.Limit 0) $.Site.Config.Services.RSS.Limit 3 }}
{{- range (first $limit $pages) }}
<article class="post">
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
{{ partial "partials/components/post-meta.html" . }}
</article>
{{- end }}