feature: Set up templated views and blog support

This commit is contained in:
Keith Solomon
2025-04-20 15:39:22 -05:00
parent 463250eb7b
commit 3fe75e9ad5
20 changed files with 580 additions and 255 deletions

View File

@@ -0,0 +1,22 @@
{{ define "blog_post_page" }}
{{ template "base" . }}
{{ end }}
{{ define "blog_post_content" }}
<article>
<h1>{{ .Title }}</h1>
{{ if .Date }}<p><small>{{ .Date }}</small></p>{{ end }}
{{ if .Categories }}
<p>
Categories:
{{ range $i, $cat := .Categories }}
{{ if $i }}, {{ end }}
<a href="/blog/category/{{ $cat | slugify }}/">{{ $cat }}</a>
{{ end }}
</p>
{{ end }}
{{ .Content }}
</article>
{{ end }}