From 11cebe734d396344f290d155f71886eaf6c7901b Mon Sep 17 00:00:00 2001 From: dvs1 Date: Wed, 15 Jan 2025 15:23:29 +1000 Subject: Sort the header links. --- notYetAnotherWiki.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 9332f9e..55953cd 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -221,15 +221,18 @@ for name, file in pairs(Files) do -- Figure out this pages header links. metadata.header = '' + + + subs = {} for i, f in pairs(Subs[path].subs) do + table.insert(subs, f) + end + table.sort(subs) + for i, f in ipairs(subs) do local pth = path if '' ~= path then pth = path .. '/' end local fl = whichPage(pth .. f) --- if '' == fl then --- metadata.header = metadata.header .. f .. '   ' --- else - metadata.header = metadata.header .. '' .. f .. '   ' --- end + metadata.header = metadata.header .. '' .. f .. '   ' end -- Figure out this pages menu links. -- cgit v1.1