Now that year sections are real sections, real pages (i.e. blog posts and photos) need to be fetched recursively.
19 lines
557 B
HTML
19 lines
557 B
HTML
{{- $blogSection := site.GetPage "blog" -}}
|
|
{{- $latestBlogPosts := $blogSection.RegularPagesRecursive.ByDate.Reverse.Limit 2 -}}
|
|
|
|
{{- $photosSection := site.GetPage "photos" -}}
|
|
{{- $latestPhotoPosts := $photosSection.RegularPagesRecursive.ByDate.Reverse.Limit 4 -}}
|
|
|
|
<div class="home-latest">
|
|
{{ range $latestBlogPosts -}}
|
|
<div class="home-latest__blog">
|
|
{{ .Render "page_summary" }}
|
|
</div>
|
|
{{ end }}
|
|
{{ range $latestPhotoPosts -}}
|
|
<div class="home-latest__photo">
|
|
{{ .Render "page_summary" }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|