mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
Meta: Add icons to online man pages
Previously all the added icons weren't available in the online version of the man pages. This patch adds functionality to copy all the used icons over when assembling the HTML version.
This commit is contained in:
parent
76563c56dd
commit
89c0f84a28
|
@ -105,3 +105,12 @@ pandoc -f gfm -t html5 -s \
|
|||
|
||||
# Copy pre-made files
|
||||
cp Meta/Websites/man.serenityos.org/banner.png output/
|
||||
|
||||
# Copy icons
|
||||
mkdir output/icons
|
||||
|
||||
while read -r p; do
|
||||
rsync -a --relative Base/res/icons/./"$p" output/icons/
|
||||
done < icons.txt
|
||||
|
||||
rm icons.txt
|
||||
|
|
|
@ -3,3 +3,14 @@ function Link(el)
|
|||
el.target = string.gsub(el.target, "help://man/([^/]*)/(.*)", "../man%1/%2.html")
|
||||
return el
|
||||
end
|
||||
|
||||
function Image(el)
|
||||
local pattern = "/res/icons/(.*)"
|
||||
local image = string.gsub(el.src, pattern, "%1")
|
||||
|
||||
el.src = "../icons/" .. image
|
||||
file = io.open("icons.txt", "a+")
|
||||
file:write(image .. "\n")
|
||||
file:close()
|
||||
return el
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue