escape metadata

This commit is contained in:
Jeremy Kauffman 2019-12-07 11:36:07 -05:00
parent e8447b570a
commit 6e928b28e0
2 changed files with 15 additions and 9 deletions

View file

@ -4,9 +4,15 @@
Response::addJsAsset('/js/yt2/FormValidation.js');
Response::addJsAsset('/js/yt2/SyncStatus.js');
Response::addJsAsset('/js/yt2/youtube_video.js');
Response::setMetaTitle("LBRY YouTube Partner Program");
Response::setMetaDescription("Put your content on the blockchain, experience true content freedom, and earn rewards.");
Response::addMetaImage(Request::getHostAndProto() . '/img/lbry-partner.png');
if (in_array($_SERVER['REQUEST_URI'], ['/escapeyoutube'])) {
Response::setMetaTitle("Escape YouTube");
Response::setMetaDescription("Put your content on the LBRY blockchain before it's too late");
Response::addMetaImage('https://spee.ch/6/18OanRVGL6mQIMtj93Hb09te.jpeg');
} else {
Response::setMetaTitle("LBRY YouTube Partner Program");
Response::setMetaDescription("Put your content on the blockchain, experience true content freedom, and earn rewards.");
Response::addMetaImage(Request::getHostAndProto() . '/img/lbry-partner.png');
}
?>
<main class="ancillary youtube youtube--landing">

View file

@ -41,9 +41,13 @@
<?php endif ?>
<meta property="og:description" content="<?php echo Response::getMetaDescription() ?>"/>
<?php foreach ($images as $image): ?>
<?php if ($images): ?>
<?php foreach ($images as $image): ?>
<meta property="og:image" content="<?php echo $image ?>"/>
<?php endforeach ?>
<?php endforeach ?>
<?php $url = reset($images) ?>
<meta name="twitter:image" content="<?php echo $url ?>" />
<?php endif ?>
<meta property="og:site_name" content="LBRY"/>
<meta property="og:title" content="<?php echo $title ?>"/>
<meta property="og:type" content="article"/>
@ -57,10 +61,6 @@
<meta name="twitter:creator" content="@lbryio"/>
<meta name="twitter:description" content="<?php echo Response::getMetaDescription() ?>"/>
<meta name="twitter:title" content="<?php echo $title ?>" />
<?php if ($images): ?>
<?php $url = reset($images) ?>
<meta name="twitter:image" content="<?php echo $url ?>" />
<?php endif ?>
<?php if (in_array($_SERVER['REQUEST_URI'], ['/android', '/get'])): ?>
<meta name="twitter:card" content="app"/>