diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-14 08:06:52 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-14 08:06:52 +0100 |
commit | 707ccc2e782b359725308ebd8cbcc3f904a1b0d9 (patch) | |
tree | 3766533c63b055ae1e45f9fbe0842125bc8169b6 /plugins | |
parent | Rename org posts (diff) |
Provide an index page for write-ups with more value
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/site-prefix.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/site-prefix.lua b/plugins/site-prefix.lua index e64f839..6c7f12a 100644 --- a/plugins/site-prefix.lua +++ b/plugins/site-prefix.lua @@ -15,7 +15,11 @@ index, link = next(links) while index do href = HTML.get_attribute(link, "href") + if href then + -- remove prefix sometimes introduced by org + href = Regex.replace(href, "^file://", "") + -- Check if URL starts with a leading "/" if Regex.match(href, "^/") then -- Remove leading slashes |