Created
January 24, 2014 08:55
-
-
Save ianlewis/8594165 to your computer and use it in GitHub Desktop.
Twitter Card/Open Graph support for Blogger ref: http://qiita.com/IanMLewis/items/375d5c1d19c164de340f
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
<!-- Begin Open Graph metadata --> | |
<meta content='summary' name='twitter:card'/> | |
<meta content='@<your twitter account>' name='twitter:site'/> | |
<b:if cond='data:blog.metaDescription'> | |
<meta expr:content='data:blog.metaDescription' name='og:description'/> | |
<b:else/> | |
<!-- Twitter Cards require a description but blogger posts don't always have one --> | |
<meta content='<Default Post Description>' name='og:description'/> | |
</b:if> | |
<b:if cond='data:blog.pageType == "item"'> | |
<!-- For the individual blog post page --> | |
<meta content='article' property='og:type'/> | |
<meta expr:content='data:blog.title' property='og:site_name'/> | |
<meta expr:content='data:blog.pageName' property='og:title'/> | |
<b:if cond='data:blog.postImageThumbnailUrl'> | |
<meta expr:content='data:blog.postImageThumbnailUrl' property='og:image'/> | |
</b:if> | |
<b:else/> | |
<!-- Index, search etc. --> | |
<meta expr:content='data:blog.title' property='og:title'/> | |
<meta content='website' property='og:type'/> | |
<meta content='<Default image url here>' property='og:image'/> | |
</b:if> | |
<meta expr:content='"<your locale>"' property='og:locale'/> | |
<meta expr:content='data:blog.canonicalUrl' property='og:url'/> | |
<!-- End Open Graph metadata --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment