Fixing open graph for messenger
This commit is contained in:
parent
e49ec9c5a8
commit
fc25d8e7f4
1 changed files with 6 additions and 2 deletions
|
|
@ -361,6 +361,8 @@ $baseParams = ($rawKeyword !== '') ? ['q' => $rawKeyword] : [];
|
||||||
$defaultOgImageUrl = 'https://bubulescu.org/assets/img/bubulescuorg.jpg';
|
$defaultOgImageUrl = 'https://bubulescu.org/assets/img/bubulescuorg.jpg';
|
||||||
$ogImageUrl = $defaultOgImageUrl;
|
$ogImageUrl = $defaultOgImageUrl;
|
||||||
$ogImageAlt = 'MVLog: journal of an unreliable narrator.';
|
$ogImageAlt = 'MVLog: journal of an unreliable narrator.';
|
||||||
|
$ogType = ($articleId !== '') ? 'article' : 'website';
|
||||||
|
$ogUrl = ($articleId !== '') ? ('https://bubulescu.org/?id=' . rawurlencode($articleId)) : 'https://bubulescu.org/';
|
||||||
$pageTitle = 'MVLog';
|
$pageTitle = 'MVLog';
|
||||||
if ($articleId !== '') {
|
if ($articleId !== '') {
|
||||||
$customOg = article_og_image_url($articleId);
|
$customOg = article_og_image_url($articleId);
|
||||||
|
|
@ -388,10 +390,10 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
||||||
<title><?=h($pageTitle)?></title>
|
<title><?=h($pageTitle)?></title>
|
||||||
|
|
||||||
<!-- Basic Open Graph -->
|
<!-- Basic Open Graph -->
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="<?=h($ogType)?>">
|
||||||
<meta property="og:title" content="<?=h($ogImageAlt)?>">
|
<meta property="og:title" content="<?=h($ogImageAlt)?>">
|
||||||
<meta property="og:description" content="Motorcycle road stories, hockey passion, pizza nerdism and facts remembered by an unreliable narrator.">
|
<meta property="og:description" content="Motorcycle road stories, hockey passion, pizza nerdism and facts remembered by an unreliable narrator.">
|
||||||
<meta property="og:url" content="https://bubulescu.org/">
|
<meta property="og:url" content="<?=h($ogUrl)?>">
|
||||||
<meta property="og:site_name" content="Bubulescu.Org">
|
<meta property="og:site_name" content="Bubulescu.Org">
|
||||||
|
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
|
|
@ -404,6 +406,8 @@ $siteHeaderTitle = $headerTitles[array_rand($headerTitles)];
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:image" content="<?=h($ogImageUrl)?>">
|
<meta name="twitter:image" content="<?=h($ogImageUrl)?>">
|
||||||
|
<meta name="twitter:title" content="<?=h($ogImageAlt)?>">
|
||||||
|
<meta name="twitter:description" content="Motorcycle road stories, hockey passion, pizza nerdism and facts remembered by an unreliable narrator.">
|
||||||
|
|
||||||
<link rel="alternate" type="application/rss+xml" title="MVLog RSS" href="feed.php">
|
<link rel="alternate" type="application/rss+xml" title="MVLog RSS" href="feed.php">
|
||||||
<link rel="icon" type="image/png" href="assets/img/moto_travel.png">
|
<link rel="icon" type="image/png" href="assets/img/moto_travel.png">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue