Browse Source

large twitter cards for articles

master
rra 7 years ago
parent
commit
6d3ca3399f
  1. 9
      theme/wttf/templates/syndication.html

9
theme/wttf/templates/syndication.html

@ -27,23 +27,18 @@ serves as the default image for posts whose featured_image is not set. #}
<meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}">
<meta name="twitter:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}">
{% if article.featured_image %}
{% if I18N_SUBSITES %}
{% for lang, url in I18N_SUBSITES.items() %}
{% if lang == 'en' %}
<meta name="twitter:card" content="summary_large_image">
<meta property="og:image" content="{{SITEURL}}/{{article.featured_image}}" />
<meta property="og:image:secure_url" content="{{SITEURL}}/{{article.featured_image}}" />
<meta name="twitter:image" content="{{SITEURL}}/{{article.featured_image}}" >
{% endif %}
{% endfor %}
{% endif %}
{% else %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
<meta name="twitter:card" content="summary" />
{% endif %}
{% endif %}
<meta name="twitter:card" content="summary" />
{% endif %}
{% if not article %}
<meta property="og:title" content="{{ SITENAME|striptags|e }}"/>

Loading…
Cancel
Save