Fix index for newer hugo versions

This commit is contained in:
Steven Engler 2022-02-12 18:35:15 -05:00
parent 5ed1ffec4a
commit 35f0af2f28

View File

@ -1,8 +1,8 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} {{ .Content }}
{{ if gt ( len ( where .Pages "Section" "posts" )) 0 }} {{ if gt ( len ( where .Site.RegularPages "Section" "posts" )) 0 }}
<h2>Recent Posts</h2> <h2>Recent Posts</h2>
{{ range first 2 ( where .Pages "Section" "posts" ) }} {{ range first 2 ( where .Site.RegularPages "Section" "posts" ) }}
<article class="all-list"> <article class="all-list">
<div class="title-list"> <div class="title-list">
<h3><a href="{{ .RelPermalink }}">{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</a></h3> <h3><a href="{{ .RelPermalink }}">{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</a></h3>