From e13a1f95885fefcca2eaa760787a63928c05d91d Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Tue, 6 Feb 2024 14:50:49 -0500 Subject: [PATCH] Fix broken doc search links, timestamp v0.23.3 --- Changes | 6 +++++- lib/PGXN/Site/Templates.pm | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index d613139..77e78b7 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,10 @@ Revision history for Perl extension PGXN::Site -0.23.3 +0.23.3 2024-02-06T20:20:13Z + - Fixed 404 "Not Found" errors for documentation with uppercase characters + in the file name, such as `/dist/vectorize/vector-serve/README.html`, + and fixes another letter casing issue for links to between stable, + testing, and unstable states on the distribution page. 0.23.2 2024-02-05T21:28:11Z - Restored the limit on the list of recent release on the home page to five. diff --git a/lib/PGXN/Site/Templates.pm b/lib/PGXN/Site/Templates.pm index 4692bc7..9c98276 100644 --- a/lib/PGXN/Site/Templates.pm +++ b/lib/PGXN/Site/Templates.pm @@ -377,7 +377,7 @@ template distribution => sub { my $datetime = $dist->date_for(lc $status); (my $date = $datetime) =~ s{T.+}{}; a { - href is '/dist/' . $dist->name . lc "/$stat_version/"; + href is '/dist/' . lc $dist->name . "/$stat_version/"; outs $dist->name . " $stat_version — "; outs_raw qq{}; } @@ -393,7 +393,7 @@ template distribution => sub { for my $rel (@rels) { # Include release status in the option name? option { - value is '/dist/' . lc $dist->name . lc "/$rel->{version}/"; + value is '/dist/' . lc $dist->name . "/$rel->{version}/"; selected is 'selected' if $rel->{version} eq $version; (my $date = $rel->{date}) =~ s{T.+}{}; "$rel->{version} — $date"; @@ -989,7 +989,7 @@ sub _detailed_results { h2 { if ($hit->{docpath}) { a { - href is '/dist/' . lc $hit->{dist} . "/$hit->{docpath}.html"; + href is "/dist/\L$hit->{dist}\E/$hit->{docpath}.html"; $hit->{$label} }; } else {