Jekyll Widgets
A set of useful widgets for jekyll sites.
What it does
Jekyll Widgets is a collection of snippets for common hosted apps & widgets such as facebook comments or Google Analytics.
Installation
- Add the following to your site's
Gemfile
:
gem 'jekyll-widgets'
- Add the following to your site's
_config.yml
:
gems:
- jekyll-widgets
Usage
Jekyll Widgets contains a number of different widgets, all with their own configuration parameters. The general syntax is as follows:
{% widget widget-name param1="var1" param2="var2" %}
You can use liquid variables too, even passing all params as a single hash.
Consider the following example:
---
provider: piwik
options:
baseurl: //example.com
site_id: 123
---
{% widget {{page.provider}} params=page.options %}
Is the same as:
{% widget piwik site_id=123 baseurl="//example.com" %}
Available Widgets
Analytics
Google Analytics
{% widget google_analytics tracking_id=GOOGLE_ANALYTICS_TRACKING_ID %}
GetClicky
{% widget getclicky site_id=GETCLICKY_SITE_ID %}
Mixpanel
{% widget mixpanel token=MIXPANEL_TOKEN %}
Piwik
{% widget piwik site_id=PIWIK_SITE_ID baseurl="//yoursite.com" %}
Comments
Disqus
{% widget disqus shortname=DISQUS_SHORTNAME %}
Facebook Comments
{% widget facebook_comments appid=YOUR_FACEBOOK_APP_ID num_posts=5 width=500 colorscheme="dark" %}
IntenseDebate
{% widget intensedebate account=YOUR_INTENSEDEBATE_ACCOUNT %}
Livefyre
{% widget livefyre site_id=YOUR_LIVEFYRE_SITE_ID %}
Share Buttons
DonReach
{% widget donshare providers="facebook,twitter,google,linkedin,pinterest" %}