I Haz Make Octopress Plugin
This week I’m deep in the process of converting a variety of PHP/MySQL backed sites (mostly Joomla and Symfony 1.4) over to Octopress, mostly because I don’t want to deal with the overhead of running MySQL (In the past, I’ve had to upgrade my Slicehost VPS in order to keep MySQL from hanging). Some of the pages had a little Facebook likebox included with them to collect likes. My search for an Octopress aside that would create a likebox was fruitless, so I made one.
How it works
Basically there is a plugin (likebox.rb
) and an aside (likebox.html
). To use the plugin/aside you move the files into their respective correct locations, then modify the default layout to load the likebox.rb
plugin if Facebook likebox configuration is detected in _config.yml
. The only reason there is a plugin is to load up the Facebook Javascript SDK code so the markup in likebox.html
works correctly.
I’m wondering if there is a more elegant way to load up the Javascript SDK rather than just adding an if loop that will spit out static markup if true.
Check it out on github: octopress-facebook-likebox