rockcampbell.com/themes/parchment/layouts/index.html

21 lines
770 B
HTML

{{ define "main" }}
<ul class="post-list">
{{- range where .Site.RegularPages "Section" "posts" }}
<li class="post-list__entry">
<div class="post-list__meta">
<time class="post-list__date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
{{- with .Params.categories }}
<span class="post-list__category">{{ index . 0 | lower }}</span>
{{- end }}
</div>
<div class="post-list__body">
<a href="{{ .Permalink }}" class="post-list__title">{{ .Title }}</a>
{{- $excerpt := or .Description .Params.summary (.Summary | plainify) }}
{{- if $excerpt }}
<p class="post-list__excerpt">{{ $excerpt | truncate 200 }}</p>
{{- end }}
</div>
</li>
{{- end }}
</ul>
{{ end }}