sample: preview image of rendered font overview
[sheet.git] / sample.plp
index b4d2c44c963b7534351d500b0a54d43f9b8e52e2..adae7bd4c8b6bf505607b33ceefa449297aae3eb 100644 (file)
@@ -1,12 +1,15 @@
 <(common.inc.plp)><:
 
 my $textinc = 'data/unicode-sampler/unicode.txt';
+my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's');
+my $preview = "$proto$ENV{HTTP_HOST}/sample.png";
 
 Html({
        title => "unicode sampler",
        version => '2.0',
        stylesheet => [qw'light dark mono red'],
        data => [$textinc],
+       raw => qq(<meta property="og:image" content="$preview" />),
 });
 
 open my $source, '<', $textinc