commit 362d82285ccb9d033309e653084b8254f923392e
parent fb43b46b48f6e26a03b84fd8e0e9dac3ceae84f2
Author: Chris Bracken <chris@bracken.jp>
Date: Mon, 19 Aug 2019 22:08:23 -0700
Use .RegularPages instead of .Pages
As of Hugo 0.57, .Pages includes sections, not just regular pages.
.RegularPages has been added to get the previous behaviour.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layouts/index.html b/layouts/index.html
@@ -1,7 +1,7 @@
{{- define "content" -}}
<section id="posts">
<ol class="post-list">
-{{- range .Site.Pages }}
+{{- range where .Site.RegularPages "Type" "post" }}
<li>{{ dateFormat "2006-01-02" .Date }}: <a href="{{ .Permalink }}">{{ .Title }}</a>
{{- end }}
</ol>