forestryio / jekyll-menus

A menus (site navigation) plugin for your Jekyll website that also works with https://forestry.io (Jekyll CMS)
MIT License
133 stars 27 forks source link

Front-matter menus broken with J4 & R3 #26

Open mpetuska opened 2 years ago

mpetuska commented 2 years ago

It looks like simple frontmatter menus are broken.

Reproducer source

---
layout: post
title: About
permalink: /about
menus: header
---

Logs

/usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:164:in `_simple_front_matter_menu': wrong number of arguments (given 2, expected 1) (ArgumentError)
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:103:in `_front_matter_menu'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:69:in `block (2 levels) in _page_menus'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:68:in `map'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:68:in `block in _page_menus'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:67:in `each'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:67:in `each_with_object'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:67:in `_page_menus'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:18:in `menus'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus.rb:26:in `to_liquid_drop'
        from /usr/gem/gems/jekyll-menus-0.6.1/lib/jekyll/menus/hook.rb:14:in `block in <top (required)>'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/hooks.rb:103:in `block in trigger'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/hooks.rb:102:in `each'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/hooks.rb:102:in `trigger'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/site.rb:189:in `render'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/site.rb:71:in `process'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/command.rb:28:in `process_site'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/build.rb:65:in `build'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/build.rb:36:in `process'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/serve.rb:93:in `block in start'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/serve.rb:93:in `each'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/serve.rb:93:in `start'
        from /usr/gem/gems/jekyll-3.9.2/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /usr/gem/gems/jekyll-3.9.2/exe/jekyll:15:in `<top (required)>'
        from /usr/local/bundle/bin/jekyll:27:in `load'
        from /usr/local/bundle/bin/jekyll:27:in `<main>'

Environment

jekyll: 4+ ruby: 3+

dileepkushwaha commented 2 years ago

Facing the same problem despite adding webrick.

agnescameron commented 1 year ago

Hi, is there a fix or workaround for this issue? Thanks!

Zijian-Zhu commented 1 year ago

I am facing the same problem. Does anyone have a solution for this?