mpalmer / jekyll-static-comments

A plugin for Jekyll to implement a static-file based comments system
http://theshed.hezmatt.org/jekyll-static-comments/
GNU General Public License v3.0
195 stars 33 forks source link

Fix compatibility with Jekyll >= 1.1.0 #14

Open IQAndreas opened 11 years ago

IQAndreas commented 11 years ago

Adds an additional argument added in a newer Jekyll version. Luckily, since the value is optional, this plugin is still compatible with older versions of Jekyll.

Fixes https://github.com/mpalmer/jekyll-static-comments/issues/13

parkr commented 11 years ago

You won't get any attributes if you pass in nil.

parkr commented 11 years ago

15 should do it.

IQAndreas commented 11 years ago

You won't get any attributes if you pass in nil.

Actually, you will, since Jekyll's version of to_liquid looks like this:

(attrs || self.class::ATTRIBUTES_FOR_LIQUID)
IQAndreas commented 11 years ago

https://github.com/mpalmer/jekyll-static-comments/pull/15 should do it.

Actually, your code isn't compatible with previous versions of Jekyll (and for reference, Octopress still uses Jekyll 0.12.0).

I added a fix for reverse-compatibility with previous versions in my fork, but had forgotten to add those fixes to this pull request.

See what I mean by "not compatible with other versions"? Damn monkey-patching dynamic languages.

parkr commented 11 years ago

@IQAndreas That's totally fine, as this is a plugin for Jekyll. My fix happens to be for the latest version of Jekyll, as the only rational assumption for me to make is that this plugin is compatible with Jekyll v1.x, as it's been out for many months now. Octopress is another story and I didn't consider it here for the reason you stated.