summaryrefslogtreecommitdiffstats
path: root/themes/lv2/templates/includes/twitter_cards.html
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-21 01:12:26 -0500
committerDavid Robillard <d@drobilla.net>2014-11-21 01:12:26 -0500
commitd38c4094a1aef8be93218adeefe66b20308d96e3 (patch)
tree7f1d451dd1edade63567504c67b61bbc24d7c683 /themes/lv2/templates/includes/twitter_cards.html
downloadlv2site-d38c4094a1aef8be93218adeefe66b20308d96e3.tar.xz
Initial website Markdown conversion.
Diffstat (limited to 'themes/lv2/templates/includes/twitter_cards.html')
-rw-r--r--themes/lv2/templates/includes/twitter_cards.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/themes/lv2/templates/includes/twitter_cards.html b/themes/lv2/templates/includes/twitter_cards.html
new file mode 100644
index 0000000..3145915
--- /dev/null
+++ b/themes/lv2/templates/includes/twitter_cards.html
@@ -0,0 +1,27 @@
+{% if TWITTER_CARDS and USE_OPEN_GRAPH %}
+ {# Do not include duplicates tag with og ones. #}
+ {# Twitter is able to infer them from og. #}
+ <meta name="twitter:card" content="summary">
+ {% if TWITTER_USERNAME %}
+ <meta name="twitter:site" content="@{{ TWITTER_USERNAME }}">
+ <meta name="twitter:creator" content="@{{ TWITTER_USERNAME }}">
+ {% endif %}
+ <meta name="twitter:domain" content="{{ SITEURL }}">
+ {% if article %}
+ {% if article.og_image %}
+ <meta property="twitter:image"
+ content="{{ SITEURL }}/{{ article.og_image }}"/>
+ {% elif OPEN_GRAPH_IMAGE %}
+ <meta property="twitter:image"
+ content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
+ {% endif %}
+ {% elif page %}
+ {% if page.og_image %}
+ <meta property="twitter:image"
+ content="{{ SITEURL }}/{{ page.og_image }}"/>
+ {% elif OPEN_GRAPH_IMAGE %}
+ <meta property="twitter:image"
+ content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
+ {% endif %}
+ {% endif %}
+{% endif %}