blob: f0a50e6eaf800c126b988f59f9251a46685177f8 (
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
29
30
31
32
33
34
35
|
local tk = require 'toolkit'
function get_blog_links()
local links = '<ul>\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('<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
[<-prev](https://cyberia.click/prev.cgi?source=sanine)
[<img src="/cyberia.svg" width="15px" alt="Cyberia Computer Club logo"></img>](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,
}
|