✨feature: Set up templated views and blog support
This commit is contained in:
22
templates/blog_post_page.html
Normal file
22
templates/blog_post_page.html
Normal 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 }}
|
||||
Reference in New Issue
Block a user