A simple Octopress aside and plugin to display a Facebook likebox for a Facebook page
Based on the HTML5 implementation of the Facebook Likebox
###Install Instructions
- Copy
likebox.rb
to yourplugins
directory - Copy
likebox.html
to yoursource/_includes/asides
directory - Add the following to your
source/_layouts/default.html
right below the opening<body>
tag:
{% if site.Facebook_pagename %}
{% likebox %}
{% endif %}
- Add configuration info to
_config.yml
###Configuring Facebook likebox There are a number of optional parameters relating to the display of the likebox. They are fully documented at the Facebook developer's website above, but here is a brief overview
facebook_pagename
This is required. If your Facebook page is www.Facebook.com/mycoolpage, then the Facebook_pagename
would be mycoolpage
facebook_showfaces
Will display the faces of people who have liked the page on Facebook.
facebook_showstream
Will stream the latest posts from your page.
facebook_bordercolor
Change the color of the border of the likebox (in hex). This parameter is not required.
facebook_darktheme
Set to true to change to a darker theme for the likebox.
facebook_height
Manually set the height for the likebox.
facebook_width
Manually set the width for the likebox. Facebook will default the width to 292px. If you're using the default Octopress theme, set the width to 260px for it to fit in the aside area.
###Example snippet to add to _config.yml:
# Facebook likebox (for pages)
facebook_pagename: MyCoolPage
facebook_showfaces: true
facebook_showstream: true
facebook_width: 260
###Send feedback
This is my first Octopress plugin! Am I doing it wrong?