Really fix homepage preview

This commit is contained in:
Rico Sta. Cruz 2017-09-08 05:00:02 +08:00
parent ec56e6359c
commit a44755e0da
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 8 additions and 2 deletions

View File

@ -30,8 +30,14 @@
{%comment%}<!-- image -->{%endcomment%}
{% if site.data.assets.preview_host %}
<meta content='{{ site.data.assets.preview_host }}{{ page.url | remove: '.html' | default: 'index' }}.jpg?t={{ timestamp }}' property='og:image'>
<meta content='{{ site.data.assets.preview_host }}{{ page.url | remove: '.html' | default: 'index' }}.jpg?t={{ timestamp }}' property='twitter:image'>
{{ page.url }}
{% if page.type == 'home' %}
<meta content='{{ site.data.assets.preview_host }}/index.jpg?t={{ timestamp }}' property='og:image'>
<meta content='{{ site.data.assets.preview_host }}/index.jpg?t={{ timestamp }}' property='twitter:image'>
{% else %}
<meta content='{{ site.data.assets.preview_host }}{{ page.url | remove: '.html' }}.jpg?t={{ timestamp }}' property='og:image'>
<meta content='{{ site.data.assets.preview_host }}{{ page.url | remove: '.html' }}.jpg?t={{ timestamp }}' property='twitter:image'>
{% endif %}
<meta content='900' property='og:image:width'>
<meta content='471' property='og:image:height'>
{% endif %}