diff options
Diffstat (limited to 'site_root/index.lua')
-rw-r--r-- | site_root/index.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/site_root/index.lua b/site_root/index.lua new file mode 100644 index 0000000..cc5f699 --- /dev/null +++ b/site_root/index.lua @@ -0,0 +1,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, +} |