Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Support for the Summary Twitter Card in Jekyll
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_username">
<meta name="twitter:creator" content="@creator_username">
{% if page.title %}
<meta name="twitter:title" content="{{ page.title }}">
{% else %}
<meta name="twitter:title" content="{{ site.title }}">
{% endif %}
{% if page.url %}
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}">
{% endif %}
{% if page.description %}
<meta name="twitter:description" content="{{ page.description }}">
{% else %}
<meta name="twitter:description" content="{{ site.description }}">
{% endif %}
{% if page.image %}
<meta name="twitter:image:src" content="{{ site.url }}/path/to/image/{{ page.image }}">
{% else %}
<meta name="twitter:image:src" content="{{ site.url }}/path/to/image/logo.png">
{% endif %}

This comment has been minimized.

Copy link
Owner Author

@davidensinger davidensinger commented Apr 18, 2013

For more information, please see my post on Supporting Twitter Cards with Jekyll.


This comment has been minimized.

Copy link

@i3arnon i3arnon commented May 8, 2016

Are you sure twitter:url is picked up by the summary card?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.