Created
November 21, 2014 14:40
-
-
Save vdaubry/d404f792a87699c665e2 to your computer and use it in GitHub Desktop.
Twitter meta tags for jekyll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Twitter cards metadatas --> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@vdaubry"> | |
<meta name="twitter:creator" content="@vdaubry"> | |
{% 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.header-img %} | |
<meta name="twitter:image:src" content="{{ site.url }}/{{ page.header-img }}"> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment