aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Barry Clark <barry@barryclark.co> 2015-03-01 14:35:17 -0500
committerGravatar Barry Clark <barry@barryclark.co> 2015-03-01 14:35:17 -0500
commitd824fd879e8190a796ea21306cd3e8b7525189ad (patch)
tree78899765285eb08cb7bbbb17a3ef8dcad3dd651b
parente29df684bd31f193092409c9af5ce71091e2094f (diff)
downloadkompetenzbolzen.github.io-d824fd879e8190a796ea21306cd3e8b7525189ad.tar.gz
Improve metadata for posts and pages (closes #50)
-rw-r--r--_includes/meta.html18
-rw-r--r--_layouts/default.html7
2 files changed, 19 insertions, 6 deletions
diff --git a/_includes/meta.html b/_includes/meta.html
new file mode 100644
index 0000000..b8f4a33
--- /dev/null
+++ b/_includes/meta.html
@@ -0,0 +1,18 @@
+ <meta charset="utf-8" />
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
+ <meta http-equiv='X-UA-Compatible' content='IE=edge'>
+ <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>
+
+ {% if page.excerpt %}
+ <meta name="description" content="{{ page.excerpt| strip_html }}" />
+ <meta property="og:description" content="{{ page.excerpt| strip_html }}" />
+ {% else %}
+ <meta name="description" content="{{ site.description }}">
+ <meta property="og:description" content="{{ site.description }}" />
+ {% endif %}
+ <meta name="author" content="{{ site.name }}" />
+
+ {% if page.title %}
+ <meta property="og:title" content="{{ page.title }}" />
+ <meta property="twitter:title" content="{{ page.title }}" />
+ {% endif %} \ No newline at end of file
diff --git a/_layouts/default.html b/_layouts/default.html
index f4d3255..b2939c0 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -1,14 +1,9 @@
<!DOCTYPE html>
<html>
<head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
-
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }} – {{ site.description }}</title>
- <meta name="author" content="{{ site.name }}" />
- <meta name="description" content="{{ site.description }}">
+ {% include meta.html %}
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>