summaryrefslogtreecommitdiff
path: root/layouts/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..6fda406
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,21 @@
+{{ define "main" }}
+
+{{ .Content }}
+
+<section>
+ <h2>Recent posts</h2>
+
+ {{ range first 5 (where site.RegularPages "Section" "blog").ByDate.Reverse }}
+ <article>
+ <time datetime="{{ .Date.Format " 2006-01-02" }}">
+ {{ .Date.Format "02 Jan, 2006" }}
+ </time>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ </article>
+ {{ end }}
+ <br>
+
+ <a href="/blog/">View all posts →</a>
+</section>
+
+{{ end }}