aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xnotYetAnotherWiki.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 4fd9fa1..0329852 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -108,16 +108,16 @@ end
108-- These functions assume the above file and sub scan has completed. 108-- These functions assume the above file and sub scan has completed.
109 109
110-- Which page in this directory should we show? 110-- Which page in this directory should we show?
111-- NOTE - only looking for the .md files we scanned for before, any stray HTML, html, HTM, atd htm files will get ignored. 111-- NOTE - only looking for the .md files we scanned for before, any stray HTML, html, HTM, and htm files will get ignored.
112local whichPage = function(f) 112local whichPage = function(f)
113 local fl = '' 113 local fl = ''
114 if (nil ~= Subs[f]) and (nil ~= Subs[f].files) then 114 if (nil ~= Subs[f]) and (nil ~= Subs[f].files) then
115 if 1 == #(Subs[f].files) then fl = Subs[f].files[1] .. '.HTML' else 115 if 1 == #(Subs[f].files) then fl = Subs[f].files[1] else
116 -- Standard files to search for. 116 -- Standard files to search for.
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 fl = w .. '.HTML' 120 fl = w
121 break 121 break
122 end 122 end
123 end 123 end
@@ -127,6 +127,7 @@ local whichPage = function(f)
127 if ('' == fl) and (nil ~= Subs[f].files[1]) then fl = Subs[f].files[1] end 127 if ('' == fl) and (nil ~= Subs[f].files[1]) then fl = Subs[f].files[1] end
128 end 128 end
129 end 129 end
130 if '' ~= fl then fl = fl .. '.HTML' end
130 return fl 131 return fl
131end 132end
132 133