summaryrefslogtreecommitdiffstats
path: root/blog
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2016-10-03 21:05:59 +0200
committerHarald Eilertsen <haraldei@anduin.net>2016-10-03 21:05:59 +0200
commit637089bb2545ef666a2531bef1cdac873c6c26c2 (patch)
tree5f7d6050ffb1d9edcdf4e0aa9dee2e10b69269d0 /blog
parent1fb92c2159618e244f3acbdb4e31f0baf8de6e18 (diff)
downloadnorsk-urskog-main-637089bb2545ef666a2531bef1cdac873c6c26c2.tar.gz
norsk-urskog-main-637089bb2545ef666a2531bef1cdac873c6c26c2.tar.bz2
norsk-urskog-main-637089bb2545ef666a2531bef1cdac873c6c26c2.zip
Add opengraph meta tags to head section.
Diffstat (limited to 'blog')
-rw-r--r--blog/_includes/head.html1
-rw-r--r--blog/_includes/opengraph.html14
2 files changed, 15 insertions, 0 deletions
diff --git a/blog/_includes/head.html b/blog/_includes/head.html
index 1d66aa8..e345ae5 100644
--- a/blog/_includes/head.html
+++ b/blog/_includes/head.html
@@ -9,6 +9,7 @@
{% endif %}
</title>
<meta name="description" content="{{ site.description }}">
+ {% include opengraph.html %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl_root | prepend: site.url }}">
{% stylesheet main %}
</head>
diff --git a/blog/_includes/opengraph.html b/blog/_includes/opengraph.html
new file mode 100644
index 0000000..46b099a
--- /dev/null
+++ b/blog/_includes/opengraph.html
@@ -0,0 +1,14 @@
+{% if page.title %}
+ <meta property="og:title" content="{{ page.title }}">
+{% endif %}
+<meta property="og:type" content="article">
+<meta property="og:url" content="{{ page.url | prepend: site.baseurl }}">
+<meta property="og:site_name" content="{{ site.title }}">
+{% if page.excerpt %}
+ <meta property="og:description" content="{{ page.excerpt | strip_html }}">
+{% else %}
+ <meta property="og:description" content="{{ site.description }}">
+{% endif %}
+{% if page.page-image %}
+ <meta property="og:image" content="{{ page.page-image | prepend: site.baseurl }}">
+{% endif %}