]> git.dujemihanovic.xyz Git - dujemihanovic.xyz.git/blobdiff - layouts/index.html
Add recent posts to homepage
[dujemihanovic.xyz.git] / layouts / index.html
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644 (file)
index 0000000..567a4ab
--- /dev/null
@@ -0,0 +1,11 @@
+{{ define "main" }}
+{{ .Content }}
+<h1>Recent Posts</h1>
+<ul>
+       {{ range first 5 ($.Site.GetPage "/posts").Pages }}
+       <li><a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }}</li>
+       {{ end }}
+</ul>
+<ul style="list-style: none;"><li><a href="/posts">Read all the posts</a></li></ul>
+
+{{ end }}