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
[<-prev](https://cyberia.click/prev.cgi?source=sanine)
... [cyberia webring!](https://cyberia.click) ...
[next->](https://cyberia.click/next.cgi?source=sanine)
[subscribe via rss](/rss.xml)
]], get_blog_links())
return {
title='home',
layout='base',
markdown=md,
}