add blog and recipe layouts

This commit is contained in:
Ben Charlton 2024-04-14 13:19:10 +01:00
parent 28a0467135
commit 7016e2a4f7
4 changed files with 80 additions and 0 deletions

15
layouts/blog/list.html Normal file
View file

@ -0,0 +1,15 @@
{{ define "main" -}}
<ul class="posts">
<h1>{{ .Title }}</h1>
{{ range .Data.Pages -}}
<li>
<div class="flex">
<a href="{{ .Permalink }}" class="truncate">{{ .Title }}</a>
{{ if eq .Kind "page" }}
<time class="nowrap" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
{{ end }}
</div>
</li>
{{- end }}
</ul>
{{- end }}