diff options
author | dvs1 | 2025-01-10 14:45:53 +1000 |
---|---|---|
committer | dvs1 | 2025-01-10 14:45:53 +1000 |
commit | 027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4 (patch) | |
tree | 688d1d078e4e9cf1a8127abe1951bef331bd4a34 | |
parent | More messing with colours. I get my own. B-) (diff) | |
download | notYetAnotherWiki-027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4.zip notYetAnotherWiki-027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4.tar.gz notYetAnotherWiki-027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4.tar.bz2 notYetAnotherWiki-027b71897b0dc5587e3da3cd7c4d7a62b5cc63c4.tar.xz |
Fix headers, now we find a page at the destination.
Diffstat (limited to '')
-rwxr-xr-x | notYetAnotherWiki.lua | 16 |
1 files 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) | |||
117 | for i, v in ipairs{'about', 'readme', 'index', 'homepage', 'mainpage', 'webhome'} do | 117 | for i, v in ipairs{'about', 'readme', 'index', 'homepage', 'mainpage', 'webhome'} do |
118 | for j, w in ipairs(Subs[f].files) do | 118 | for j, w in ipairs(Subs[f].files) do |
119 | if v == string.lower(w) then | 119 | if v == string.lower(w) then |
120 | print('FOUND ' .. v .. '.HTML') | ||
121 | fl = v .. '.HTML' | 120 | fl = v .. '.HTML' |
122 | break | 121 | break |
123 | end | 122 | end |
@@ -221,19 +220,12 @@ for name, file in pairs(Files) do | |||
221 | 220 | ||
222 | -- Figure out this pages header links. | 221 | -- Figure out this pages header links. |
223 | metadata.header = '' | 222 | metadata.header = '' |
224 | local pth = '' | ||
225 | for i, f in pairs(Subs[path].subs) do | 223 | for i, f in pairs(Subs[path].subs) do |
226 | local fl = '' | 224 | local pth = path |
227 | if '' ~= path then | 225 | if '' ~= path then pth = path .. '/' end |
228 | if '' ~= pth then pth = pth .. '/' end | 226 | local fl = whichPage(pth .. f) |
229 | pth = pth .. f | ||
230 | fl = whichPage(pth) | ||
231 | else | ||
232 | fl = whichPage(f) | ||
233 | end | ||
234 | |||
235 | -- if '' == fl then | 227 | -- if '' == fl then |
236 | -- metadata.header = metadata.header .. f .. '</a> ' | 228 | -- metadata.header = metadata.header .. f .. ' ' |
237 | -- else | 229 | -- else |
238 | metadata.header = metadata.header .. '<a href="' .. f .. '/' .. fl .. '">' .. f .. '</a> ' | 230 | metadata.header = metadata.header .. '<a href="' .. f .. '/' .. fl .. '">' .. f .. '</a> ' |
239 | -- end | 231 | -- end |