jekyll-static-comments icon indicating copy to clipboard operation
jekyll-static-comments copied to clipboard

Fix compatibility with Jekyll >= 1.1.0

Open IQAndreas opened this issue 12 years ago • 5 comments

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

IQAndreas avatar Sep 28 '13 07:09 IQAndreas

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

parkr avatar Oct 20 '13 18:10 parkr

#15 should do it.

parkr avatar Oct 20 '13 18:10 parkr

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 avatar Oct 20 '13 20:10 IQAndreas

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.

IQAndreas avatar Oct 20 '13 20:10 IQAndreas

@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.

parkr avatar Oct 20 '13 23:10 parkr