Update head.html

enable OG descriptions for all pages if available
This commit is contained in:
Andrew Cassidy 2019-05-05 00:21:27 -07:00
parent 8df114e8c3
commit 876f5b33a0
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1

View File

@ -12,6 +12,18 @@
content="{{site.url}}/images/{{page.path | split: '/' | last | split: '.' | first }}/{{page.image}}"/>
{% endif %}
{% if page.description %}
<meta
property="og:description"
content="{{page.description}}"
/>
{% else %}
<meta
property="og:description"
content="{{page.content | markdownify | strip_html | truncate: 100}}"
/>
{% endif %}
{% if page.collection == "posts" %}
<meta property="og:type"
content="article"/>
@ -24,18 +36,6 @@
<meta property="article:tag" content="{{ tag }}"/>
{% endfor %}
{% if page.description %}
<meta
property="og:description"
content="{{page.description}}"
/>
{% else %}
<meta
property="og:description"
content="{{page.content | markdownify | strip_html | truncate: 100}}"
/>
{% endif %}
{% else %}
<meta property="og:type"
content="website"/>