index: release v1.18 with only altgr index linked
[sheet.git] / common.inc.plp
index 8a13059a5c50c139cb1f698c5f463a29d17f4354..a634733cba704de18de8e56605a78a796f8109c9 100644 (file)
@@ -76,7 +76,7 @@ sub stylesheet {
 
        return map { sprintf(
                '<link rel="%s" type="text/css" media="all" href="%s" title="%s">',
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.17", $_
+               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css?1.18", $_
        ) } @avail;
 }
 
@@ -157,7 +157,8 @@ sub Html {
 
        my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
 
-       if (my $url = $meta->{canonical} // "/$file/$Request") {
+       $meta->{canonical} //= "/$file" . ($Request ne '' && "/$Request");
+       if (my $url = $meta->{canonical}) {
                $url = "https://sheet.shiar.nl$url";
                push @{ $meta->{raw} }, qq(<link rel="canonical" href="$url" />);
        }