summaryrefslogtreecommitdiff
path: root/Meta/convert-markdown-links.lua
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-20 21:35:46 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-22 19:49:28 +0300
commit7e52b6fa2464b41c5e67c57b023a9ad063eb61ca (patch)
tree4a172a811949490e24f1b687614f96c8c40e8b0e /Meta/convert-markdown-links.lua
parent5c04a2d4b34be9b1e1dd662d8377af926b88d863 (diff)
downloadserenity-7e52b6fa2464b41c5e67c57b023a9ad063eb61ca.zip
man.serenityos.org: Simplify local builds
I simply extracted the script from .github/workflows/manpages.yml, without significant modification.
Diffstat (limited to 'Meta/convert-markdown-links.lua')
-rw-r--r--Meta/convert-markdown-links.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/Meta/convert-markdown-links.lua b/Meta/convert-markdown-links.lua
new file mode 100644
index 0000000000..0f960e5656
--- /dev/null
+++ b/Meta/convert-markdown-links.lua
@@ -0,0 +1,5 @@
+function Link(el)
+ el.target = string.gsub(el.target, "%.md", ".html") -- change .md to .html links
+ el.target = string.gsub(el.target, "man", "", 1) -- change man1/???.html to 1/???.html links
+ return el
+end