git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
article: ignore placeholders before teaser paragraph
[minimedit.git]
/
head.inc.php
diff --git
a/head.inc.php
b/head.inc.php
index ff6397197f01bfb405bfaf14690ea06266117071..2b29afc41a6e135ba7b45b2540b017cb517264af 100644
(file)
--- a/
head.inc.php
+++ b/
head.inc.php
@@
-2,13
+2,18
@@
<html lang="nl">
<head>
<meta charset="utf-8" />
<html lang="nl">
<head>
<meta charset="utf-8" />
-<?php if (!empty($Place['title'])) { ?>
- <title><?= htmlspecialchars($Place['title']) ?></title>
+<?php if ($Article->title) { ?>
+ <title><?= htmlspecialchars($Article->safetitle) ?></title>
+<?php } ?>
+<?php if ($Article->teaser) { ?>
+ <meta name="description" property="og:description" content="<?= strip_tags($Article->teaser) ?>" />
<?php } ?>
<meta name="viewport" content="width=device-width" />
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script><![endif]-->
<?php } ?>
<meta name="viewport" content="width=device-width" />
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script><![endif]-->
-<?php if (
!empty($Place['image'])
) { ?>
- <meta property="og:image" content="https://<?= $_SERVER['HTTP_HOST'] .
htmlspecialchars($Place['image']
) ?>" />
+<?php if (
$Article->image
) { ?>
+ <meta property="og:image" content="https://<?= $_SERVER['HTTP_HOST'] .
'/' . htmlspecialchars($Article->thumb('640x')
) ?>" />
<?php } ?>
<?php } ?>
+ <meta property="og:type" content="<?= $Article->meta['og:type'] ?? 'website' ?>" />
+ <meta property="og:url" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Article->link) ?>" />
</head>
<body>
</head>
<body>