summaryrefslogtreecommitdiff
path: root/site_root/index.lua
blob: cc5f6991c0233b5b5f83920c9916587c3ceb08cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local tk = require 'toolkit'

function get_blog_links()
   local links = '<ul>\n'
   for _, page in pairs(tk.pages('blog/')) do
      links = links ..
	 string.format('<li><a href="%s">[%s] %s</a></li>\n', page.href, page.date, page.title)
   end
   return links..'</ul>'
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,
}