summaryrefslogtreecommitdiff
path: root/site_root/index.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-01-14 22:39:20 -0600
committersanine <sanine.not@pm.me>2022-01-14 22:39:20 -0600
commita8233923bf56782a53ea48e655e4a9a111b22279 (patch)
tree77aa0291ae267fbbb7ae4ea407ea14cec7777215 /site_root/index.lua
parentc1a6d4f050dbf9304f1f00b72a8b44c232479a88 (diff)
add refactor-argent blog post and updated favicon
Diffstat (limited to 'site_root/index.lua')
-rw-r--r--site_root/index.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/site_root/index.lua b/site_root/index.lua
index cc5f699..c419830 100644
--- a/site_root/index.lua
+++ b/site_root/index.lua
@@ -2,7 +2,9 @@ local tk = require 'toolkit'
function get_blog_links()
local links = '<ul>\n'
- for _, page in pairs(tk.pages('blog/')) do
+ 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