Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Commit

Permalink
v 1.0.3 SEO update, og tags
Browse files Browse the repository at this point in the history
  • Loading branch information
excodex committed Dec 7, 2016
1 parent 751ced3 commit 6d19cbf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<meta name="description" content="<?php echo $config["Site_Description"]; ?>">
<meta name="author" content="<?php echo $config["Site_Author"]; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
Expand Down
1 change: 1 addition & 0 deletions offline.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<meta name="description" content="<?php echo $config["Site_Description"]; ?>">
<meta name="author" content="<?php echo $config["Site_Author"]; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
Expand Down
18 changes: 14 additions & 4 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
header("Location: index.php");
die();
}
$og_title = strlen($get_data["title"]) > 36 ? substr($get_data["title"], 0, 36) . " ..." : $get_data["title"];
$og_description = strlen($get_data["content"]) > 106 ? substr($get_data["content"], 0, 106) . " ..." : $get_data["content"];
$og_author = $get_data["author"];
mysqli_close($sql);
?>
<!DOCTYPE html>
Expand All @@ -35,6 +38,13 @@
<meta name="description" content="<?php echo $config["Site_Description"]; ?>">
<meta name="author" content="<?php echo $config["Site_Author"]; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<meta property="og:site_name" content="<?php echo $config["Site_Title"]; ?>">
<meta property="og:type" content="article">
<meta property="og:title" content="<?php echo $og_title; ?>">
<meta property="og:description" content="<?php echo $og_description; ?>">
<meta property="article:published_time" content="<?php echo date("Y-m-d", strtotime($get_data["date"])) . "T" . date("H:i:s", strtotime($get_data["date"])) . "+0000"; ?>">
<meta property="article:author" content="<?php echo $og_author; ?>">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
Expand Down Expand Up @@ -64,7 +74,7 @@
});
quill.setContents(<?php echo $get_data["content"]; ?>);
</script>
</div>
</div>
</body>
</html>
</div>
</div>
</body>
</html>

0 comments on commit 6d19cbf

Please sign in to comment.