mpalmer/jekyll-static-comments

Jekyll 3 compatiblity

Opened this issue · 2 comments

mcwui commented

I found jekyll-static-comments to be incompatible with Jekyll 3 as the to_liquid method moved to Convertible in 3.0 and the they seem to use Drops from 3.1 on. The latest Jekyll version I got the plugin to work with is 2.5.3. Any plans to update the plugin?

I had a quick glimpse into the changes of Jekyll and I guess it should be sufficient to use Jekyll::Document instead of Jekyll::Post. Feel free to cherry-pick my commit 5fcc3ac. That at least fixes it for me.

However, I'm not entirely sure as I didn't check all the Jekyll changes. You should probably also consider investigating what @mnot did in commit 77941d. He's not using the to_liquid stuff anymore, but post_read which seems to be especially entailed for posts.
Comparing @mnot's updates with mine: His work looks a bit more sophisticated ;-)

I'd be happy to receive feedback on this! :)

rr- commented

I went with hooks approach as I believe they're more elegant: https://github.com/rr-/sakuya.pl/commit/100a3ab5abbbe0796e80efabb4b8579551ce326b
Point of interest for people from future - I had to manually change post_path metadata in all of existing comments so that it refers to the posts' ID rather than their physical paths.