diff options
author | Yorhel <git@yorhel.nl> | 2020-05-11 13:17:08 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-05-11 13:17:08 +0200 |
commit | 86a367b6021e42e3a7b7c60d99039f8a66340182 (patch) | |
tree | b69cf2d71bff1b32ee3613225b18d0a5e2c17622 | |
parent | 5a0b3d8119c530ffb1306e9e96b34dbc86be3c74 (diff) |
Char::Page: Add og:image tag
-rw-r--r-- | lib/VNWeb/Chars/Page.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNWeb/Chars/Page.pm b/lib/VNWeb/Chars/Page.pm index d46cc2de..f3047427 100644 --- a/lib/VNWeb/Chars/Page.pm +++ b/lib/VNWeb/Chars/Page.pm @@ -293,7 +293,8 @@ TUWF::get qr{/$RE{crev}} => sub { framework_ title => $c->{name}, index => !tuwf->capture('rev'), type => 'c', dbobj => $c, hiddenmsg => 1, og => { - description => bb2text $c->{desc} + description => bb2text($c->{desc}), + image => $c->{image} && $c->{image}{sexual_avg} < 0.4 && $c->{image}{violence_avg} < 0.4 ? tuwf->imgurl($c->{image}{id}) : undef, }, sub { _rev_ $c if tuwf->capture('rev'); |