From e868c1f2d95b7701cb08b08f9d01e9a5b74079e8 Mon Sep 17 00:00:00 2001 From: flan Date: Mon, 16 Jan 2017 00:33:31 +0100 Subject: Add Open Graph tags for the main page and vrspc --- lib/VNDB/Handler/Misc.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/VNDB/Handler/Misc.pm') diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm index 9cdbf4e2..6bda8091 100644 --- a/lib/VNDB/Handler/Misc.pm +++ b/lib/VNDB/Handler/Misc.pm @@ -35,12 +35,22 @@ TUWF::register( sub homepage { my $self = shift; - $self->htmlHeader(title => 'The Visual Novel Database', feeds => [ keys %{$self->{atom_feeds}} ]); + + my $title = 'The Visual Novel Database'; + my $desc = 'VNDB.org strives to be a comprehensive database for information about visual novels.'; + + my $metadata = { + 'og:type' => 'website', + 'og:title' => $title, + 'og:description' => $desc, + }; + + $self->htmlHeader(title => $title, feeds => [ keys %{$self->{atom_feeds}} ], metadata => $metadata); div class => 'mainbox'; - h1 'The Visual Novel Database'; + h1 $title; p class => 'description'; - txt 'VNDB.org strives to be a comprehensive database for information about visual novels.'; + txt $desc; br; txt 'This website is built as a wiki, meaning that anyone can freely add' .' and contribute information to the database, allowing us to create the' -- cgit v1.2.3