mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
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:
parent
98c0c5e9e6
commit
9e471353dd
Notes:
sideshowbarker
2024-07-17 21:14:05 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/9e471353dda Pull-request: https://github.com/SerenityOS/serenity/pull/11683 Reviewed-by: https://github.com/alimpfard ✅ Reviewed-by: https://github.com/linusg ✅
4 changed files with 13 additions and 1 deletions
5
Meta/Websites/man.serenityos.org/cant-run-application.md
Normal file
5
Meta/Websites/man.serenityos.org/cant-run-application.md
Normal 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)
|
|
@ -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/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue