浏览代码

Tweak and add missing meta tags

DricomDragon 4 年之前
父节点
当前提交
6399ed18b7
共有 1 个文件被更改,包括 30 次插入4 次删除
  1. 30 4
      web/include/head.php

+ 30 - 4
web/include/head.php

@@ -2,10 +2,36 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
-    <!-- Page description -->
-    <meta name="description" content="The official website of Jovian Hersemeule.">
-    <meta name="author" content="Jovian Hersemeule">
-    <meta property="og:image" content="/include/images/home_picture_v1.jpg">
+	<!-- Description variables -->
+	<?php
+		$shareImg = "/include/images/home_picture_v1.jpg";
+		$author = "Jovian HERSEMEULE";
+		$description = "Le site officiel de Jovian Hersemeule";
+	?>
+
+    <!-- Generic description -->
+	<meta name="description" content="<?php echo $description; ?>">
+	<meta name="author" content="<?php echo $author; ?>">
+
+	<!-- Google / Search Engine Tags -->
+	<meta itemprop="name" content="<?php echo $author; ?>">
+	<meta itemprop="description" content="<?php echo $description; ?>">
+	<meta itemprop="image" content="<?php echo $shareImg; ?>">
+
+	<!-- Facebook Meta Tags -->
+	<meta property="og:url" content="https://www.jovian-hersemeule.eu">
+	<meta property="og:type" content="website">
+	<meta property="og:title" content="<?php echo $author; ?>">
+	<meta property="og:description" content="<?php echo $description; ?>">
+	<meta property="og:image" content="<?php echo $shareImg; ?>">
+
+	<!-- Twitter Meta Tags -->
+	<meta name="twitter:card" content="summary_large_image">
+	<meta name="twitter:title" content="<?php echo $author; ?>">
+	<meta name="twitter:description" content="<?php echo $description; ?>">
+	<meta name="twitter:image" content="<?php echo $shareImg; ?>">
+
+	<!-- Meta Tags Generated via http://heymeta.com -->
 
     <!-- Style sheet -->
     <link href="/include/css/bootstrap.css" rel="stylesheet">