aboutsummaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-09-15 17:38:06 +0300
committerValentin Popov <info@valentineus.link>2018-09-15 17:38:06 +0300
commite6b47f13c0413ddef17f09e7d1693c66407a4840 (patch)
treef824d4cb5b2835cd37502c2b19747ef956fad3dd /_includes
parentb6cfea0c942b57342eb85e2498e7af4802a66721 (diff)
downloadpopov.link-e6b47f13c0413ddef17f09e7d1693c66407a4840.tar.xz
popov.link-e6b47f13c0413ddef17f09e7d1693c66407a4840.zip
Adding a protocol 'Open Graph'
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to '_includes')
-rw-r--r--_includes/head.html5
-rw-r--r--_includes/opengraph.html14
2 files changed, 18 insertions, 1 deletions
diff --git a/_includes/head.html b/_includes/head.html
index cd01190..47a4da9 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -12,6 +12,9 @@
content="{{ tag.content | strip_newlines | strip_html | strip | normalize_whitespace | xml_escape }}" />
{% endfor %}
+ <!-- Open Graph -->
+ {% include opengraph.html %}
+
<!-- Title / Description -->
<meta name="application-name" content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
<meta name="description" content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncate: 100 | xml_escape }}" />
@@ -31,4 +34,4 @@
<!--[if lte IE 9]>
<script type="text/javascript" src="{{ '/assets/javascript/html5shiv-3.7.3.min.js' | relative_url | uri_escape }}"></script>
<![endif]-->
-</head>
+</head> \ No newline at end of file
diff --git a/_includes/opengraph.html b/_includes/opengraph.html
new file mode 100644
index 0000000..ae5a731
--- /dev/null
+++ b/_includes/opengraph.html
@@ -0,0 +1,14 @@
+<meta property="og:title"
+ content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
+
+<meta property="og:description"
+ content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncate: 100 | xml_escape }}" />
+
+<meta property="og:type"
+ content="{{ page.layout | replace: 'post', 'article' | replace: 'page', 'website' | default: 'website' }}" />
+
+<meta property="og:image"
+ content="{{ page.image | absolute_url | uri_escape }}" />
+
+<meta property="og:url"
+ content="{{ page.url | absolute_url | uri_escape }}" /> \ No newline at end of file