-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts.html
27 lines (25 loc) · 937 Bytes
/
posts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
{{ include "include/head.html" "posts" "holedaemon.net blog posts" }}
<link rel="stylesheet" href="/static/css/posts.css">
</head>
<body>
<h1>wow it's my super cool blog</h1>
<div id="list">
{{ if eq (len (listFiles "/posts")) 0 }}
My lazy ass hasn't written anything
{{ else }}
<ul id="posts-ul">
{{ range $file := (listFiles "/posts") }}
<li class="list-item">
{{ $name := printf "/posts/%s" $file }}
{{ $coolFile := (include $name | splitFrontMatter)}}
<a href="/posts/{{ trimSuffix (ext $file) $file }}">{{ $coolFile.Meta.title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</body>
</html>