Making Articles on TypePad Social Media Ready with Open Graph

An alert reader of the NewPath Consulting newsletter recently shared one of our articles on LinkedIn and noticed something interesting. When you share on social media platforms like Facebook, Twitter or LinkedIn, extra information about your post should be displayed as you begin to share an article. Unfortunately because we are using Advanced Templates on TypePad, we did not have any of the tags coded to support Open Graph, the standard coding mechanism used to render the rich media previews and search engine optimization.

The TypePad Knowledgebase has a short article on implementing Open Graph, but we went one step further and created a code snippet that can be used to create the necessary markup for both pages and posts.

image from www.brightedge.com

Below is the code you can insert into your custom Header template or include to support a variety of meta data. These tags will cover most social media platforms. Note that we are using a tag called MTIfNonEmpty to evaluate whether an article has an excerpt loaded. Since TypePad can autogenerate excerpts, using this tag effectively lets us evaluate whether we are adding these tags to a page or post. This conditional trickery lets us use the same piece of code on ALL of our pages and posts of the website.


">

 


">


- ">







">



">

- ">
- ">

" />



" />


" />
" />

" />


- " />



" />
" />

About the author

Alex is a pioneer in using the cloud to meet the needs of small and medium sized business (SMBs) and membership-based organizations. He has a BSc in computer science from the University of Michigan and has worked as a product manager at two Internet startups. Alex is a father of 2 and plays the trumpet for fun. He is the founder and the president of the University of Michigan Alumni Club of Toronto.