<div class="feed-label">Latest</div>
<div class="feed-grid">
- {{ range site.RegularPages }}
- {{ if eq .Type "articles" }}
- {{ $data := dict "title" .Title "type" .Params.type "description" .Summary "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }}
+ {{ $articlesSection := .Site.GetPage "/articles" }}
+ {{ if $articlesSection }}
+ {{ $articles := $articlesSection.Pages }}
+ {{ $articles := sort $articles "Date" "desc" }}
+ {{ range first 6 $articles }}
+ {{ $type := .Params.type }}
+ {{ if not $type }}{{ $type = "article" }}{{ end }}
+ {{ $data := dict "title" .Title "type" $type "description" .Summary "date" .Date "url" .RelPermalink "image" .Params.image "featured" .Params.featured }}
{{ partial "post-card.html" $data }}
{{ end }}
{{ end }}