✨feature: Wire up blog section
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user