From 027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Fri, 10 Jan 2025 14:45:53 +1000 Subject: Fix headers, now we find a page at the destination. --- notYetAnotherWiki.lua | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index 297a57d..da88a52 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua @@ -117,7 +117,6 @@ local whichPage = function(f) for i, v in ipairs{'about', 'readme', 'index', 'homepage', 'mainpage', 'webhome'} do for j, w in ipairs(Subs[f].files) do if v == string.lower(w) then - print('FOUND ' .. v .. '.HTML') fl = v .. '.HTML' break end @@ -221,19 +220,12 @@ for name, file in pairs(Files) do -- Figure out this pages header links. metadata.header = '' - local pth = '' for i, f in pairs(Subs[path].subs) do - local fl = '' - if '' ~= path then - if '' ~= pth then pth = pth .. '/' end - pth = pth .. f - fl = whichPage(pth) - else - fl = whichPage(f) - end - + local pth = path + if '' ~= path then pth = path .. '/' end + local fl = whichPage(pth .. f) -- if '' == fl then --- metadata.header = metadata.header .. f .. '   ' +-- metadata.header = metadata.header .. f .. '   ' -- else metadata.header = metadata.header .. '' .. f .. '   ' -- end -- cgit v1.1