1
0
Fork 0
mirror of https://github.com/safing/web synced 2025-04-09 05:29:10 +00:00
safing-web/_includes/head_ogp.html
2022-04-21 12:32:32 +02:00

63 lines
No EOL
2.3 KiB
HTML

<!-- Other & Facebook -->
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ page.title }}">
{% comment %}
TODO: Daniel said leave a comment here and this
need also need more clarification for how/what
should be displayed here
<meta property="og:description" content="
{%- if page.summary != null -%}
{{ page.summary | truncatewords: 18 }}
{%- else -%}
{{ site.description }}
{%- endif -%}
">
{% endcomment %}
<meta property="og:image" content="
{%- if page.category == "podcast" -%}
{%- if page.custom_thumbnail_name -%}
{{ site.url }}{{ site.img_url }}thumbnails/podcast/{{ page.custom_thumbnail_name }}.png
{%- else -%}
{{ site.url }}{{ site.img_url }}thumbnails/podcast/placeholder.png
{%- endif -%}
{%- elsif page.category == "video" -%}
{{ site.url }}{{ site.img_url }}thumbnails/video/{{ page.custom_thumbnail_name }}.png
{%- elsif page.category == "blog" -%}
{{ site.url }}{{ site.img_url }}thumbnails/blog/{{ page.custom_thumbnail_name }}.png
{%- else -%}
{{ site.url }}{{ site.img_url }}ogp/default.png
{%- endif -%}
">
<!-- Twitter -->
<meta name="twitter:title" content="{{ page.title }}">
{% comment %}
TODO: Daniel said leave a comment here and this
need also need more clarification for how/what
should be displayed here
<meta name="twitter:description" content="
{%- if page.summary != null -%}
{{ page.summary | truncatewords: 18 }}
{%- else -%}
{{ site.description }}
{%- endif -%}
">
{% endcomment %}
<meta name="twitter:site" content="{{ site.twitter_username }}">
<meta name="twitter:card" content="{{ site.twitter_card_type }}">
<meta name="twitter:image" content="
{%- if page.category == "podcast" -%}
{%- if page.custom_thumbnail_name -%}
{{ site.url }}{{ site.img_url }}thumbnails/podcast/{{ page.custom_thumbnail_name }}.png
{%- else -%}
{{ site.url }}{{ site.img_url }}thumbnails/podcast/placeholder.png
{%- endif -%}
{%- elsif page.category == "video" -%}
{{ site.url }}{{ site.img_url }}thumbnails/video/{{ page.custom_thumbnail_name }}.png
{%- elsif page.category == "blog" -%}
{{ site.url }}{{ site.img_url }}thumbnails/blog/{{ page.custom_thumbnail_name }}.png
{%- else -%}
{{ site.url }}{{ site.img_url }}ogp/default.png
{%- endif -%}
">