pagination broken in jekyll 3
ChrisJefferson opened this issue · 5 comments
I think pagination has changed (sorry, fairly new user). If I don't install jekyll-pagination I get an error. If I install it, I instead get the following. I like how this theme looks, so it would be nice if this could be fixed (or someone could tell me what I'm doing wrong...)
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-pagination-0.0.4/lib/jekyll/pagination.rb:61:in `alias_method': undefined method `pagination_enabled?' for class `Class' (NameError)
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-pagination-0.0.4/lib/jekyll/pagination.rb:61:in `singleton class'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-pagination-0.0.4/lib/jekyll/pagination.rb:54:in `<class:Pager>'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-pagination-0.0.4/lib/jekyll/pagination.rb:52:in `<module:Jekyll>'
Interesting! Likely a change to APIs in newer versions. Regardless, I think you need to stick with jekyll 2.4, as github pages doesn't currently support jekyll 3 anyway, according to this: https://pages.github.com/versions/
I'm using Jekyll 3 on my own website, and I only started a couple of days ago. But maybe I have arrived at a bad transition time :)
Seems like it just might be bad timing - and certainly on your own website you aren't stuck with whatever version github (or whoever) decides to use. If you figure out what it takes to get this to work on jekyll 3, I'm happy to make sure it's backwards compatible with 2.4 and merge it in. Otherwise, if I get some time I can try and figure it out, but no promises!
OK, so I gave this a try with jekyll 3.0.1, and it worked for me without any changes except for adding a "gems:" line to _config.yml! I'm wondering if you have an old version of jekyll-pagination - I ended up with version 1.1.0, it looks like you have 0.0.4?
I added this to _config.yml:
gems: ['jekyll-paginate']
And here's the full list of gems installed on this box (which should be pretty minimal):
bigdecimal (1.2.4)
colorator (0.1)
ffi (1.9.10)
io-console (0.4.2)
jekyll (3.0.1)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
jekyll-watch (1.3.0)
json (1.8.1)
kramdown (1.9.0)
liquid (3.0.6)
listen (3.0.5)
mercenary (0.3.5)
minitest (4.7.5)
posix-spawn (0.3.11)
psych (2.0.5)
pygments.rb (0.6.3)
rake (10.1.0)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
rdoc (4.1.0)
redcarpet (3.3.3)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.20)
test-unit (2.1.5.0)
yajl-ruby (1.2.1)
Can you double-check that you have recent versions of these, especially jekyll-paginate?
I'm going to go ahead and close this - all the evidence I have is that this works just fine on jekyll 3.0 as well as 2.4. As of af93eff the jekyll-paginate gem is explicitly included. All looks good when running jekyll 3.0 locally as well as on gh-pages with 2.4.
If you find it's still not working, feel free to re-open this...