Twitter and OpenGraph meta tags; favicon

This commit is contained in:
mmk2410 2015-07-05 18:02:19 +02:00
parent accc37e5be
commit b6e719b6c6
2 changed files with 47 additions and 25 deletions

View file

@ -9,8 +9,6 @@ $blogtitle = 'Rangitaki Blog';
$blogauthor = 'Marcel Kapfer';
// Blog description
$blogdescription = 'Rangitaki - A PHP blogging engine without any database dependency';
// Blog favicon - enter here the path to your favicon
$blogfavicon = '../res/favicon.png';
// Home - set yes if you want to link to your homepage and no if not
$bloghome = 'yes';
// Home URL - Set here the url to your main page. Either relative (e.g. '../') or absolute (e.g. 'http://github.com')
@ -38,3 +36,5 @@ $nav_drawer = 'yes';
$theme = 'material-light';
// Set here your language. The file must exist in the lang directory
$language = "en";
// Favicon - Set here the path to your favicon
$favicon = "https://example.com/res/img/favicon.png"

View file

@ -1,30 +1,36 @@
<!DOCTYPE HTML>
<!-- pBlog https://github.com/mmk2410/pblog -->
<!--
The MIT License
Rangitaki
GitHub: https://github.com/mmk2410/Rangitaki
Web: https://marcel-kapfer.de/rangitaki
Twitter: @Rangitaki
Google+: +Rangitaki
-->
<!--
COPYRIGHT (c) 2015 mmk2410
Copyright 2015 mmk2410.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<html>
<?php
include 'config.php';
include './lang/' . $language . ".php";
@ -43,9 +49,26 @@ THE SOFTWARE.
<meta name="author" content="<?php echo $blogauthor; ?>" />
<meta name="description" content="<?php echo $blogdescription; ?>" />
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<!-- OpenGraph meta tags -->
<meta property="og:title" content="<?php echo $blogtitle; ?>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<?php echo $url; ?>" />
<meta property="og:image" content="<?php echo $favicon; ?>" />
<meta property="og:description" content="<?php echo $blogdescription; ?>" />
<meta property="og:locale:alternate" content="<?php echo $lang; ?>" />
<!-- Twitter meta tags -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="<?php echo $twitter; ?>" />
<meta name="twitter:title" content="<?php echo $blogtitle; ?>" />
<meta name="twitter:description" content="<?php echo $blogdescription; ?>" />
<meta name="twitter:image" content="<?php echo $favicon; ?>" />
<meta name="twitter:url" content="<?php echo $url; ?>" />
<!--CSS no change needed-->
<link rel="stylesheet" type="text/css" href="res/css/rangitaki.css" />
<link rel="stylesheet" type="text/css" href="themes/<?php echo $theme; ?>.css" />
<link rel="shortcut icon" type="image/x-icon" href="<?php echo $favicon; ?>" />
<link rel="apple-touch-icon-precomposed" href="<?php echo $favicon; ?>">
<?php
if ($nav_drawer == 'no') {
?>
@ -54,7 +77,6 @@ THE SOFTWARE.
}
?>
<link href='//fonts.googleapis.com/css?family=Roboto:400,500,700,300,400italic,100,100italic,900' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="res/favicon.png">
<link rel="stylesheet" href="./res/css/github-gist.css">
<script src="./res/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>