jekyll-paginate-v2: Errors trying to write pagination pages with Jekyll v4
Using the Pr #167 which relaxes the Jekyll dependency to allow v4, I’m seeing the following error which crashes the build.
I can see in the verbose --trace that my post tags are all being read correctly before this, but when it tries to write autopages for tags it breaks.
It’s possible it’s something related to the paper-for-ios tag it seems to be failing on since a couple of category paginated pages write fine. But as far as I can tell there’s nothing unique or “wrong” with this tag other than it’s on a lot of posts.
...
Writing: E:/test-repo/_site/mastering-paper/index.html
Writing: E:/test-repo/_site/mastering-paper/page/2/index.html
Writing: E:/test-repo/_site/notes/index.html
Writing: E:/test-repo/_site/notes/page/2/index.html
Writing: E:/test-repo/_site/notes/page/3/index.html
Writing: E:/test-repo/_site/tag/paper-for-ios/index.html
E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:230:in `mkdir': File exists @ dir_s_mkdir - E:/test-repo/_site/tag/paper-for-ios/index.html (Errno::EEXIST)
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:230:in `fu_mkdir'
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:208:in `block (2 levels) in mkdir_p'
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:206:in `reverse_each'
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:206:in `block in mkdir_p'
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:191:in `each'
from E:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:191:in `mkdir_p'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:225:in `write'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:219:in `block in write'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:344:in `block (2 levels) in each_site_file'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `each'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `block in each_site_file'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each_site_file'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:218:in `write'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:78:in `process'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/bin/jekyll:23:in `load'
from E:/Ruby24-x64/lib/ruby/gems/2.4.0/bin/jekyll:23:in `<main>'
Will test on macOS to see if it’s a Windows thing when I get a chance.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (7 by maintainers)
Commits related to this issue
- Update jekyll-paginate-v2 gem to 2.0.0 fork Versions > 2.0.0 introduced a bug with Autopages with pagination Ref: https://github.com/sverrirs/jekyll-paginate-v2/issues/170 — committed to mmistakes/made-mistakes-jekyll by mmistakes 5 years ago
- Use mmistakes/jekyll-paginate-v2 as a workaround Ref: sverrirs/jekyll-paginate-v2#170 — committed to iBug/iBug-source by iBug 4 years ago
- Auto deploy from GitHub Actions [781f66d] Use mmistakes/jekyll-paginate-v2 as a workaround Ref: sverrirs/jekyll-paginate-v2#170 — committed to iBug-web/iBug-web.github.io by web-flow 4 years ago
- Bump Paginate V2 to 3.0.0 https://github.com/sverrirs/jekyll-paginate-v2/issues/170#issuecomment-583668234 — committed to iBug/iBug-source by iBug 4 years ago
- Auto deploy from GitHub Actions [4935956] Bump Paginate V2 to 3.0.0 https://github.com/sverrirs/jekyll-paginate-v2/issues/170#issuecomment-583668234 — committed to iBug-web/iBug-web.github.io by web-flow 4 years ago
- Use mmistakes/jekyll-paginate-v2 as a workaround Ref: sverrirs/jekyll-paginate-v2#170 — committed to iBug/iBug-source by iBug 4 years ago
- Bump Paginate V2 to 3.0.0 https://github.com/sverrirs/jekyll-paginate-v2/issues/170#issuecomment-583668234 — committed to iBug/iBug-source by iBug 4 years ago
Hello everyone !
@mmistakes’ advises work well, so here is a straightforward way to achieve this technically on your own :
Apply @mmistakes’ “patch” (👌) :
Bye 👋
@hosnas I’d try the fork and see if your site builds. If it does use it. If it doesn’t, don’t wait to upgrade.
You’re not missing much with Jekyll 4 right now other than some nice performance gains.
Yeah, it’s a big complicated mess. Let me do some further testing and push up a smaller repro site since my build workflow uses Gulp to kickoff the Jekyll build.
It seems isolated to
autopages.tags. When I disable that module in_config.ymleverything builds fine… just with no paginated tag pages.Repo restored to last known good state with selective cherrypicks, please upgrade to https://rubygems.org/gems/jekyll-paginate-v2/versions/3.0.0
Hi all, been a little busy with life but I will have a look and attempt to revert the repo back to the last known good state and relax the restrictions to enable jekyll 4
@sverrirs Is it feasible to release a v2.0.1 from 2.0.0 code with no changes but the loosened requirement for Jekyll version? I almost forked it on RubyGems only for this change.
@curious-toad You’ll want to downgrade jekyll-paginate-v2 to
2.0.0and not use the latest release of2.0.1as it introduced some sort of defect with the Autopages module. I had this issue with Jekyll v3.If you want to use Jekyll v4 you can use my fork of the gem, which is pretty much 2.0.0 but with one small change to allow it to support Jekyll v4.
Not sure if Autopages can create index pages for custom taxonomies. I’m pretty sure it only works with
site.tagsandsite.categories. My site is a bit misleading… theworks.mdpage and_workcollection isn’t generated or paginated via the plugin. I’m using it to build an index page that combines some collection documents along with work “posts” found in this folder.These are part of my
workcategory, which is why you might see that in the front matter but it’s not used for Autopages. I’m doing this becausetagsandcategoriesare only available via the site objects when used on posts… and not collection documents. That might have changed in Jekyll v4 but I’m not sure.@ashmaroli Does seem that you fixed it in this PR #151