mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
Meta: Update manpages website build script to handle non-icon images
Adding an image to man7/Audio-subsystem.md referencing a non-icon image file in the same directory broke the automated build of the manpages website, which was not prepared to handle this case.
This commit is contained in:
parent
9e694c9d83
commit
f377951178
Notes:
sideshowbarker
2024-07-17 10:36:26 +09:00
Author: https://github.com/linusg
Commit: f377951178
Pull-request: https://github.com/SerenityOS/serenity/pull/14130
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
2 changed files with 9 additions and 0 deletions
|
@ -105,6 +105,7 @@ pandoc -f gfm -t html5 -s \
|
||||||
|
|
||||||
# Copy pre-made files
|
# Copy pre-made files
|
||||||
cp Meta/Websites/man.serenityos.org/banner.png output/
|
cp Meta/Websites/man.serenityos.org/banner.png output/
|
||||||
|
cp Base/usr/share/man/man7/LibDSP_classes.svg output/
|
||||||
|
|
||||||
# Copy icons
|
# Copy icons
|
||||||
mkdir output/icons
|
mkdir output/icons
|
||||||
|
|
|
@ -5,6 +5,14 @@ function Link(el)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Image(el)
|
function Image(el)
|
||||||
|
-- HACK: Handle images that are not icons separately; they're copied manually in the
|
||||||
|
-- Meta/build-manpages-website.sh script.
|
||||||
|
-- Ideally this would be generalized so the paths export below could handle both.
|
||||||
|
if el.src:find("^/res/icons/") == nil then
|
||||||
|
el.src = "../" .. el.src
|
||||||
|
return el
|
||||||
|
end
|
||||||
|
|
||||||
local pattern = "/res/icons/(.*)"
|
local pattern = "/res/icons/(.*)"
|
||||||
local image = string.gsub(el.src, pattern, "%1")
|
local image = string.gsub(el.src, pattern, "%1")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue