summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2024-04-14 12:35:52 +0200
committerYorhel <git@yorhel.nl>2024-04-14 12:35:54 +0200
commitbb28e17bbdc606d6f95ec038100fee878d34a9fc (patch)
tree13569db850d8f44f135ee0fde287a610581f28a3 /www
parenta99b8aec89234f220c7ee5dcf2be27679e8f8c8f (diff)
www: Keep links to other man pages within the same systemHEADmaster
The sidebar links should actually stay within the same system as well, it's quite confusing this way. Meh.
Diffstat (limited to 'www')
-rwxr-xr-xwww/index.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/www/index.pl b/www/index.pl
index abb1f24..fbec00f 100755
--- a/www/index.pl
+++ b/www/index.pl
@@ -811,6 +811,12 @@ sub man_page {
return;
}
+ # Prefix links to other man pages with the current system, to ensure we
+ # grab the most relevant man page.
+ # XXX: This is a hack, prefixing is better done directly in ManUtils.
+ my $sys = sysbyid->{$man->{system}}{short};
+ $fmt =~ s{<a href="/}{<a href="/man/$sys/}g;
+
my @toc;
$fmt =~ s{\n<b>([^<\n]+?)<\/b>\n}{
push @toc, $1;