feature: Wire up blog section

This commit is contained in:
Keith Solomon
2025-04-19 15:48:56 -05:00
parent 472aad6bc6
commit 463250eb7b
9 changed files with 379 additions and 120 deletions

View File

@@ -4,6 +4,7 @@
<head>
<meta charset="UTF-8">
<title>{{ .Title }}</title>
{{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
</head>
<body>
@@ -18,7 +19,23 @@
</header>
<main>
{{ if .Date }}<small>Published: {{ .Date }}</small>{{ end }}
{{ .Content }}
{{ if .Posts }}
<section>
<h2>Blog Posts</h2>
<ul>
{{ range .Posts }}
<li>
<a href="/blog/{{ .Slug }}/">{{ .Title }}</a>
{{ if .Date }} <small>{{ .Date }}</small>{{ end }}<br>
{{ .Description }}
</li>
{{ end }}
</ul>
</section>
{{ end }}
</main>
<footer>