Add index content if it exists

If there is an _index.md file, it will be included at the top of listing pages.
This commit is contained in:
Travis Chen 2020-05-24 12:30:46 -07:00
parent 58ba445c9f
commit fab4cff945

View File

@ -9,6 +9,11 @@
{{ end }} {{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ if len .Content }}
<h1>{{.Title}}</h1>
{{ .Content }}
{{ end }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
<div class="post on-list"> <div class="post on-list">
<h1 class="post-title"> <h1 class="post-title">