Meta: Convert new help page link styles for the man page website

The special URL links (help://man) and the application opening links now
work on the man page website. While the page links are translated
correctly, the application launch can't be implemented. For this reason,
an explanatory error page is shown instead.
This commit is contained in:
kleines Filmröllchen 2022-01-10 22:28:43 +01:00 committed by Linus Groh
parent 98c0c5e9e6
commit 9e471353dd
Notes: sideshowbarker 2024-07-17 21:14:05 +09:00
4 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,5 @@
# Sorry :^(
This is a link to open the application directly, but that only works in SerenityOS.
[Go back to main page](index.html)

View file

@ -97,6 +97,11 @@ pandoc -f gfm -t html5 -s \
--metadata title="SerenityOS man pages" \
-o output/index.html \
Meta/Websites/man.serenityos.org/index.md
pandoc -f gfm -t html5 -s \
-B Meta/Websites/man.serenityos.org/banner-preamble.inc \
--metadata title="Can't run applications" \
-o output/cant-run-application.html \
Meta/Websites/man.serenityos.org/cant-run-application.md
# Copy pre-made files
cp Meta/Websites/man.serenityos.org/banner.png output/

View file

@ -1,4 +1,5 @@
function Link(el)
el.target = string.gsub(el.target, "%.md", ".html") -- change .md to .html links
el.target = string.gsub(el.target, "file:///bin/.*", "../cant-run-application.html")
el.target = string.gsub(el.target, "help://man/([^/]*)/(.*)", "../man%1/%2.html")
return el
end

View file

@ -47,6 +47,7 @@ static bool is_missing_file_acceptable(String const& filename)
"/man6/index.html",
"/man7/index.html",
"/man8/index.html",
"index.html",
};
for (auto const& suffix : acceptable_missing_files) {
if (filename.ends_with(suffix))