local tk = require 'toolkit'
function get_blog_links()
local links = '
\n'
local pages = tk.pages('blog/')
table.sort(pages, function(a, b) return a.date > b.date end)
for _, page in pairs(pages) do
links = links ..
string.format('- [%s] %s
\n', page.href, page.date, page.title)
end
return links..'
'
end
local md = string.format([[
home
====
welcome to sanine.net!
%s
[subscribe via rss](/rss.xml)
]], get_blog_links())
return {
title='home',
layout='base',
markdown=md,
}