1
0
mirror of https://github.com/ipdb/website.git synced 2024-12-01 13:47:09 +01:00
website/_src/_includes/sharing.html

61 lines
2.1 KiB
HTML
Raw Normal View History

2017-09-04 14:29:04 +02:00
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@ipdbfoundation">
{% if page.front_page %}
<meta name="twitter:title" content="{{ site.title }}">
{% else %}
<meta name="twitter:title" content="{{ page.title }} · {{ site.title }}">
{% endif %}
{% if page.url %}
<meta name="twitter:url" content="{{ site.url}}{{ page.url | replace:'index.html','' }}">
{% endif %}
{% if page.description %}
<meta name="twitter:description" content="{{ page.description }}">
{% elsif page.front_page %}
<meta name="twitter:description" content="{{ site.data.content-front.hero.description | strip_html | strip_newlines }}">
{% else %}
<meta name="twitter:description" content="{{ page.excerpt | strip_html }}">
{% endif %}
{% if page.image %}
<meta name="twitter:image:src" content="{{ site.url }}/assets/img/{{ page.image }}">
{% else %}
2017-09-26 11:28:18 +02:00
<meta name="twitter:image:src" content="{{ site.url }}/assets/img/share-image.png">
2017-09-04 14:29:04 +02:00
{% endif %}
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="{{ site.title }}">
{% if page.front_page %}
<meta property="og:title" content="{{ site.title }}">
{% else %}
<meta property="og:title" content="{{ page.title }} · {{ site.title }}">
{% endif %}
{% if page.description %}
<meta property="og:description" content="{{ page.description }}">
{% elsif page.front_page %}
<meta property="og:description" content="{{ site.data.content-front.hero.description | strip_html | strip_newlines }}">
{% else %}
<meta property="og:description" content="{{ page.excerpt | strip_html | strip_newlines }}">
{% endif %}
{% if page.url %}
<meta property="og:url" content="{{ site.url}}{{ page.url | replace:'index.html','' }}">
{% endif %}
{% if page.date %}
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
{% endif %}
{% if page.image %}
<meta content="{{ site.url }}/assets/img/{{ page.image }}" property="og:image">
{% else %}
<meta content="{{ site.url }}/assets/img/share-image.png" property="og:image">
{% endif %}