Cannot build jekyll on github pages

I am out of ideas. I have a website on github pages which builds just fine. I then have another one which stopped from building, I have also tried the exact same Gemfile and github-actions with no luck.

I am now blocked on this error:
Liquid Exception: Liquid syntax error (line 6): Unknown tag 'bibliography' in _pages/publications.md
I know it is a pretty common error, I tried different solutions with no luck.

In my Gemfile I have
gem "liquid", "~> 4.0"

And I also tried with different ruby versions:

  • 3.1 gives me the above error
  • 2.7.2 gives
Could not find compatible versions

Because nokogiri = 1.18.0.rc1 depends on Ruby >= 3.1.0
  and nokogiri >= 1.18.0.rc1, < 1.18.0 depends on RubyGems >= 3.3.22,
  nokogiri >= 1.18.0.rc1, < 1.18.0 requires Ruby >= 3.1.0 or RubyGems >= 3.3.22.
So, because nokogiri = 1.16.2 depends on Ruby >= 3.0.0
  and nokogiri >= 1.16.2, < 1.16.3 depends on Ruby >= 3.0, < 3.4.dev,
nokogiri >= 1.16.2, < 1.16.3 OR >= 1.18.0.rc1, < 1.18.0 requires Ruby >= 3.0.0
or RubyGems >= 3.3.22.
Error: The process '/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/bundle' failed with exit code 6

I am out of ideas

The bibliography tag isn’t a standard part of Liquid. It appears to be part of the Jekyll-Scholar plugin. Do you have Jekyll-Scholar installed in your Gemfile?

Yes, my Gemfile looks like this

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.3.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

#gem "liquid", "~> 4.0"

gem "github-pages", "~> 227", group: :jekyll_plugins

gem "jekyll-scholar", "~> 6.0", group: :jekyll_plugins

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", ">= 1", "< 3"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

However it is very strange, I got one succesfull build that although did not apply the correct theme, and then using exactly the same settings I continue to get fails.

I see you have github-pages in your Gemfile, which implies you’re using Github Pages to build the site. Github Pages has a very restricted set of plugins that are allowed, and jekyll-scholar is not one of them. That would explain the “unknown tag” error.

You also mentioned Github-Actions. Are you trying to build the site with Github-Actions? I.e. using a custom Workflow to publish the site? That would allow 3rd party plugins, but requires more configuration.

I managed to build the website, but now it does not run with the theme, even if I do not see any relevant errors.

The website is at https://lbedogni.github.io and it is updated, but without any theme applied to it

if you use the browser dev tools (right click on the page and choose inspect then click the console tab) you will see it can’t load a bunch of css and js files - probably as the path isn’t correct?

You are right, however I have used the standard paths that the al-folio theme is providing, so something may be wrong also on that side?

I am trying to debug it, but probably path errors as you said are the reason for that.

Ok, probably the problem is that in my _config.yml file I have:

  jquery:
    integrity:
      js: "sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
    url:
      js: "https://cdn.jsdelivr.net/npm/jquery@{{version}}/dist/jquery.min.js"
    version: "3.6.0"

but somehow the request goes as

https://cdn.jsdelivr.net/npm/jquery@/dist/jquery.min.js

so it seems it does not resolve the version. In fact if I type such address I get an HTML page, that’s why the error, if I visit the address like

https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js

This happens also for other libraries such as mdbootstrap. So it seems it does not resolve the @?

Ok now it’s getting better. I had a problem with the branch I was publishing from, now I set it up to be master and it works.

I see though that some layouts (such as the projects) is not the same as before, but I’ll dig into this

I’d recommend checking for similar issues in the al-folio repository. A lot of questions were asked there, and most of it answered. Probably someone had a similar issue to yours already.