X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/26a71f36c68773b18095911e99be7294cbd66f39..b55f16d857eb0de23413f042f61462c06f7f14e7:/common.inc.plp?ds=sidebyside diff --git a/common.inc.plp b/common.inc.plp index 2976cbe..9d34128 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -147,8 +147,21 @@ sub Html { '', ); + if (my $img = $meta->{image}) { + my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's'); + my $url = "$proto$ENV{HTTP_HOST}/$img"; + push @{ $meta->{raw} }, ( + qq(), + ); + } + my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x; + if (my $url = $meta->{canonical} // "/$file/$Request") { + $url = "https://sheet.shiar.nl$url"; + push @{ $meta->{raw} }, qq(); + } + PLP_START { # leading output say '';