I'm building a Jekyll site and I need to be able to convert pages to PDF. I want to use jekyll-pdf but when I include it, bundle tells me it's incompatible:
Because every version of jekyll-pdf depends on jekyll >= 3.1, < 4.A
and Gemfile depends on jekyll ~> 4.3.3,
jekyll-pdf cannot be used.
Looking at the jekyll-pdf repo it seems like it's no longer maintained so I don't expect this to change. Is there a way to force bundle to install that gem even though the dependency isn't valid?
It's impossible to install existing
jekyll-pdfgem if yourjekyllversion is4.x. But you can forkjekyll-pdfrepo and upgrade the jekyll dependency in.gemspecfile, like:Then use your updated version in Gemfile, like:
Be aware that
jekyll-pdfgem might work only for older versions ofjekyll, using newer might result in unexpected behaviours or bugs.