Add "Latest Posts" section to homepage

This commit is contained in:
2022-04-29 19:09:26 -05:00
parent 219f97bc00
commit c82d5602bb
4 changed files with 38 additions and 1 deletions

View File

@ -16,7 +16,7 @@
<main>
{{ block "main" . }}
{{ .Content }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }}
</main>

View File

@ -1,2 +1,29 @@
{{ define "main" }}
{{ with .Content }}
{{ . }}
{{ end }}
{{ if .Site.Params.homepageLatestPosts }}
<hr>
<h1>
{{ i18n "latest_posts" }}
{{ partial "rss-link.html" . }}
</h1>
{{ with (.Paginate .Site.RegularPages).Pages }}
<div class="page-list">
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
</div>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}
{{ end }}