Add single page layout, and display recent posts

This commit is contained in:
Danila Fedorin 2019-08-02 21:44:29 -07:00
parent d1ad723a22
commit fdaa87e1ea
3 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,6 @@
---
title: Daniel's Blog
---
This is the index.
## Hello!
Welcome to my blog. Here, I write various posts, usually on the topics of
functional programming, compiler development, programming language theory, and occasionally video games. I hope you find something useful here!

View File

@ -0,0 +1,4 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ end }}

View File

@ -1,3 +1,10 @@
{{ define "main" }}
{{ .Content }}
Recent posts:
<ul>
{{ range first 10 (where (where .Site.Pages.ByDate "Section" "blog") ".Kind" "!=" "section") }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}