Skip to content

Instantly share code, notes, and snippets.

@inslayn
Created April 16, 2016 01:01
Show Gist options
  • Save inslayn/43fbff3c98e58733447226f74516a08a to your computer and use it in GitHub Desktop.
Save inslayn/43fbff3c98e58733447226f74516a08a to your computer and use it in GitHub Desktop.
ghost-of-twitter-cards-tutorial.hbs
{{#if image}}
{{! If we have a featured image, use the Summary Card with Large Image type }}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@nytimes">
<meta name="twitter:creator" content="@SarahMaslinNir">
<meta name="twitter:title" content="Parade of Fans for Houston’s Funeral">
<meta name="twitter:description" content="NEWARK - The guest list and parade of limousines with celebrities emerging from them seemed more suited to a red carpet event in Hollywood or New York than than a gritty stretch of Sussex Avenue near the former site of the James M. Baxter Terrace public housing project here.">
<meta name="twitter:image" content="http://graphics8.nytimes.com/images/2012/02/19/us/19whitney-span/19whitney-span-articleLarge.jpg">
{{else}}
{{! If we don't have a featured image, use the Summary Card type }}
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@flickr" />
<meta name="twitter:title" content="Small Island Developing States Photo Submission" />
<meta name="twitter:description" content="View the album on Flickr." />
<meta name="twitter:image" content="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg" />
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment