aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xnotYetAnotherWiki.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 0883d87..5033d78 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -267,7 +267,9 @@ for l in io.popen('find -L ' .. Folder .. ' -name unsorted -prune -o -name "*.md
267 local a, e = io.open(unsort .. tp .. '.md' , 'r') 267 local a, e = io.open(unsort .. tp .. '.md' , 'r')
268 if nil ~= a then 268 if nil ~= a then
269 a:close() 269 a:close()
270 os.execute('rm ' .. unsort .. tp .. '.*') 270 -- Keep the .md.md symlink, delete the rest.
271 os.execute('rm ' .. unsort .. tp .. '.HTML')
272 os.execute('rm ' .. unsort .. tp .. '.md')
271 end 273 end
272 end 274 end
273 end 275 end
@@ -868,7 +870,15 @@ for name, file in pairs(Files) do
868 end 870 end
869 else 871 else
870 if nil ~= url then metadata.menu = metadata.menu .. '<p><a href="' .. url .. '">' .. title .. ' &#9757;</a></p>' 872 if nil ~= url then metadata.menu = metadata.menu .. '<p><a href="' .. url .. '">' .. title .. ' &#9757;</a></p>'
871 else metadata.menu = metadata.menu .. '<p><a href="' .. f .. '.HTML">' .. title .. '</a></p>' 873 else
874 local pth = file.path
875 if '' ~= pth then pth = pth .. '/' end
876 -- Don't include any left over .md.md files, so don't do this if f.md doesn't exist.
877 local a, e = io.open(pth .. f .. '.md' , 'r')
878 if nil ~= a then
879 a:close()
880 metadata.menu = metadata.menu .. '<p><a href="' .. f .. '.HTML">' .. title .. '</a></p>'
881 end
872 end 882 end
873 end 883 end
874 end 884 end