Optimize octopress for facebook post24 Feb 2014
This blog made by octopress, ruby CMS tool. As many others do, I also combined this tool with GitHub pages But this method has one fault about posting on facebook. Octopress doesn’t include ogp properties as default. Ogp properties privide facebook meta information such as title, author, description and url. So without this meta information, you cannot get proper images when you write a post on facebook. In order to attach thumbtail image to your post, you have to write some configuration on octopress.
Write appid and locale
Append below configuration in your
facebook_app_id: YOUR_APP_ID facebook_locale: ja_JP
YOUR_APP_ID might be listed on
/source/_include/facebook_like.html Paste that number.
Change facebook like action
Add top page flag
To ditinguish post articles and top page, add this flag to
--- layout: default index: true ---
Configuration for ogp meta informations
Write below meta tags to
% cat source/_includes/custom/facebook_ogp.html <meta property="og:title" content="Optimize octopress for facebook post - The First Cry of Atom" > <meta property="og:description" content="" /> <meta property="og:url" content="http://lewuathe.com" /> <meta property="og:image" content="http://www.lewuathe.com" /> <meta property="og:author" content="lewuathe" /> <meta property="og:site_name" content="The First Cry of Atom" /> <meta property="og:locale" content="" /> <meta property="og:type" content="article" /> <meta property="fb:app_id" content="" />
Include meta tags
At last, make header include these meta tags. Write below on
So that’s all. It’s ok. Deploy this site and post any entry to facebook.
Good, you can see your thumbnail. A research shows that the post that has thumbnail images attracts more people than the post that has no image can. If you are using octopress for writing your own blog, it must be the good option for increasing the access from facebook.