From 2fc460a1962105623d5706c44fd47209f98f2b29 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Fri, 14 Mar 2025 14:37:02 +1000 Subject: Fix up /System/ linkies. --- notYetAnotherWiki.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. url = link .. '/' .. string.sub(url, 7) .. '.HTML' end end + if '/System/' == string.sub(url, 1, 8) then + url = 'https://fos.wiki.devuan.org' .. url + end 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 if p == string.sub(url, 1, #p) then local ur = string.sub(url, #p + 1) @@ -655,7 +658,7 @@ local lunaLinky = function(url) -- Fix up the links. end if (nil ~= md) and (nil ~= md.realURL) then url = md.realURL end - if 'https://fos.wiki.devuan.org/bin/' ~= string.sub(url, 1, 32) then + 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 local xlnk = xLinks[string.gsub(ur, '%..*', '', 1)] if nil == Context.path then url = string.gsub(ur, '%.', '/', 1) -- cgit v1.1