aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordvs12025-03-14 14:37:02 +1000
committerdvs12025-03-14 14:37:02 +1000
commit2fc460a1962105623d5706c44fd47209f98f2b29 (patch)
tree14cc585c877872679923ab1bdad71b5cbb84f6d0
parentI'll get this right some day. (diff)
downloadnotYetAnotherWiki-2fc460a1962105623d5706c44fd47209f98f2b29.zip
notYetAnotherWiki-2fc460a1962105623d5706c44fd47209f98f2b29.tar.gz
notYetAnotherWiki-2fc460a1962105623d5706c44fd47209f98f2b29.tar.bz2
notYetAnotherWiki-2fc460a1962105623d5706c44fd47209f98f2b29.tar.xz
Fix up /System/ linkies.
-rwxr-xr-xnotYetAnotherWiki.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua
index 6eef889..a2cdccb 100755
--- a/notYetAnotherWiki.lua
+++ b/notYetAnotherWiki.lua
@@ -638,6 +638,9 @@ local lunaLinky = function(url) -- Fix up the links.
638 url = link .. '/' .. string.sub(url, 7) .. '.HTML' 638 url = link .. '/' .. string.sub(url, 7) .. '.HTML'
639 end 639 end
640 end 640 end
641 if '/System/' == string.sub(url, 1, 8) then
642 url = 'https://fos.wiki.devuan.org' .. url
643 end
641 for i, p in ipairs{'https://wiki.devuan.org/?n=', 'https://wiki.devuan.org?n=', 'PmWiki/uploads/', 'Foswiki/pub/', 'https://fos.wiki.devuan.org/'} do 644 for i, p in ipairs{'https://wiki.devuan.org/?n=', 'https://wiki.devuan.org?n=', 'PmWiki/uploads/', 'Foswiki/pub/', 'https://fos.wiki.devuan.org/'} do
642 if p == string.sub(url, 1, #p) then 645 if p == string.sub(url, 1, #p) then
643 local ur = string.sub(url, #p + 1) 646 local ur = string.sub(url, #p + 1)
@@ -655,7 +658,7 @@ local lunaLinky = function(url) -- Fix up the links.
655 end 658 end
656 if (nil ~= md) and (nil ~= md.realURL) then url = md.realURL end 659 if (nil ~= md) and (nil ~= md.realURL) then url = md.realURL end
657 660
658 if 'https://fos.wiki.devuan.org/bin/' ~= string.sub(url, 1, 32) then 661 if ('https://fos.wiki.devuan.org/bin/' ~= string.sub(url, 1, 32)) and ('https://fos.wiki.devuan.org/System/' ~= string.sub(url, 1, 35)) then
659 local xlnk = xLinks[string.gsub(ur, '%..*', '', 1)] 662 local xlnk = xLinks[string.gsub(ur, '%..*', '', 1)]
660 if nil == Context.path then 663 if nil == Context.path then
661 url = string.gsub(ur, '%.', '/', 1) 664 url = string.gsub(ur, '%.', '/', 1)