0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-04 00:20:26 +03:00

Adding a protocol 'Open Graph'

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2018-09-15 18:38:06 +04:00
parent b6cfea0c94
commit e6b47f13c0
2 changed files with 18 additions and 1 deletions

14
_includes/opengraph.html Normal file
View File

@ -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 }}" />