inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

Academicpages/minimal mistakes compatibility #358

Open antoniosgeme opened 11 months ago

antoniosgeme commented 11 months ago

I am trying to integrate this wonderful Jekyll extension with the academicpages fork of minimal mistakes, and I am getting "Tried to create Proc object without a block" errors. I am running on Windows using the latest versions of all the involved components. Are there any obvious reasons this wouldn't work? Here is the full error in case it helps at all:

Liquid Exception: tried to create Proc object without a block in _pages/publications.md jekyll 3.9.3 | Error: tried to create Proc object without a block C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:150:in new': tried to create Proc object without a block (ArgumentError) from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:150:ineach' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:497:in select' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:497:inquery' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:278:in replace' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-scholar-5.16.0/lib/jekyll/scholar/utilities.rb:172:inbibliography' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-scholar-5.16.0/lib/jekyll/scholar/utilities.rb:184:in entries' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-scholar-5.16.0/lib/jekyll/scholar/utilities.rb:790:incited_entries' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-scholar-5.16.0/lib/jekyll/scholar/tags/bibliography.rb:21:in render' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:103:inrender_node_to_output' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:91:in render' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/template.rb:206:inblock in render' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/template.rb:240:in with_profiling' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/template.rb:205:inrender' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/liquid-4.0.4/lib/liquid/template.rb:218:in render!' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:30:inblock (2 levels) in render!'
from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:42:in measure_bytes' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:29:inblock in render!' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:49:in measure_time' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:28:inrender!' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:126:in render_liquid' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:79:inrender_document' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:62:in run' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:479:inrender_regenerated' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:472:in block in render_pages' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:471:ineach' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:471:in render_pages' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:192:inrender' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/site.rb:71:in process' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/command.rb:28:inprocess_site' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:65:in build' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:36:inprocess' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:93:in block in start' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:93:ineach' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:93:in start' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:75:inblock (2 levels) in init_with_program' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in block in execute' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:ineach' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in execute' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:ingo' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in program' from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/jekyll-3.9.3/exe/jekyll:15:in<top (required)>' from C:/Ruby32-x64/bin/jekyll:32:in load' from C:/Ruby32-x64/bin/jekyll:32:in

'

inukshuk commented 11 months ago

You're using an old version of jekyll-scholar (5.x latest is 7.x). You can fix this by updating the Gem and its dependencies (specifically, bibtex-ruby here is 4.4.7 but 6.0 is the latest).

antoniosgeme commented 11 months ago

@inukshuk Thanks! It turns out there is a dependency conflict with the github-pages gem which does not support Jekyll 4. Are you aware of any workarounds?

julienguegan commented 11 months ago

Hello ! I have the exact same problem (but I use minimal-mistake theme) with github-pages that need jekyll 3.9.3. So I can't use latest version of jekyll-scholar apparently, so I tried version 5.16.0 but nevertheless the same error message is still there ...

image

If there is any solution, I would be happy to hear it

antoniosgeme commented 10 months ago

@julienguegan I have not gotten this to work. Instead, I resorted to using the bibtexparser library in python to create a YAML file which can be read by Jekyll. It works pretty well for my needs.

julienguegan commented 10 months ago

@antoniosgeme pretty interesting, can you show me an example how to use it ? When you have you're yaml generated how to you call it ? Is there a command like in latex \cite{article_id} or \ref ?

antoniosgeme commented 10 months ago

Unfortunately, there is not simple command. You have to write some liquid code to extract and format. Check out this file: https://github.com/antoniosgeme/antoniosgeme.github.io/blob/master/_pages/publications.md?plain=1