Skip to content

Compatibility with Jekyll 4 #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nhoizey opened this issue Nov 4, 2019 · 26 comments
Closed

Compatibility with Jekyll 4 #130

nhoizey opened this issue Nov 4, 2019 · 26 comments
Labels

Comments

@nhoizey
Copy link
Contributor

nhoizey commented Nov 4, 2019

I plan to upgrade my site to Jekyll 4, and there a few plugin still not compatible, like this one.

Do you know if anyone tried to use current version with Jekyll 4?

@aarongustafson
Copy link
Owner

I do not. Can you tell me what’s changed?

@miklb
Copy link

miklb commented Nov 6, 2019

I will be testing this week using GitHub Actions so can also report out.

@kslstn
Copy link
Contributor

kslstn commented Nov 10, 2019

I can't get it to work with Jekyll 4, Bundler chooses to use Jekyll 3.8.6 instead.

@miklb
Copy link

miklb commented Nov 10, 2019

If you are using the GH-pages gem, then that’s probably the Jekyll version pinned. I’ve not gotten to Actions yet.

@kslstn
Copy link
Contributor

kslstn commented Nov 10, 2019

I updated everything (including Jekyll to 4.0.0) before adding the plugin to the gemfile. After adding it, I had to bundle update and had jekyll downgraded.

@nhoizey
Copy link
Contributor Author

nhoizey commented Nov 15, 2019

@aarongustafson I think most changes are related to performance improvements, but there are a few breaking changes. Maybe @DirtyF can help us there.

@kslstn I had to fork the plugin to try Jekyll 4, and use my fork instead of @aarongustafson's latest release: https://github.com/nhoizey/nicolas-hoizey.com/blob/jekyll4/Gemfile#L33

Be careful, this is just for experimentation, I don't build my production site with it, I don't know if everything still works (I don't use everything).

That's why I didn't submit a PR (yet?).

@aarongustafson
Copy link
Owner

I have not upgraded yet, so I can't speak from experience on this one (yet). @jgarber623 may have some ideas as well.

I welcome a PR as I’ve been pretty swamped lately.

@danielpietzsch
Copy link
Contributor

Hi there,

fwiw, I have started using this gem with my own site, which started as a fresh Jekyll 4 project not long ago.
So far, I haven’t come across any errors. I’m currently using @nhoizey’s fork for gem spec compatibility. Built, deployment and hosting is done via GitLab pages (here’s an example of a post with a webmention gathered via brid.gy).

So far I'm using the following features without problems:

  • webmentions_head
  • webmentions page.url

No sending of webmentions, no JS stuff, no custom templates yet.
That are things I still plan to try out, though. I'm happy to report back if that’s desired and makes still sense once I actually got to try the other features.

@poblabs
Copy link

poblabs commented Mar 29, 2020

@danielpietzsch How were you able to get it working with Jekyll 4? I cloned @nhoizey's fork, ran these commands:

gem build jekyll-webmention_io.gemspec

  Successfully built RubyGem
  Name: jekyll-webmention_io
  Version: 3.3.5
  File: jekyll-webmention_io-3.3.5.gem
sudo gem install jekyll-webmention_io-3.3.5.gem

Successfully installed jekyll-webmention_io-3.3.5
Parsing documentation for jekyll-webmention_io-3.3.5
Done installing documentation for jekyll-webmention_io after 0 seconds
1 gem installed

But when adding {% webmentions_head %} I still get the error

  Liquid Exception: Liquid syntax error (line 17): Unknown tag 'webmentions_head' in /_layouts/default.html

I'm sure I'm missing something easy somewhere

@tosbourn
Copy link

tosbourn commented Apr 2, 2020

@poblabs I think the following in your gemfile should do the trick, no need to build manually.

gem 'jekyll-webmention_io', git: 'https://github.com/nhoizey/jekyll-webmention_io'

@danielpietzsch
Copy link
Contributor

danielpietzsch commented Apr 2, 2020

@poblabs Yes, @tosbourn is right with that line, although you would need to specify @nhoizey ’s jekyll4 branch. I have this in the Gemfile of my project:

gem 'jekyll-webmention_io', :git => 'https://github.com/nhoizey/jekyll-webmention_io.git', :branch => 'nhoizey-jekyll4'

Then run bundle install for your Jekyll 4 project and it should install this plugin.

General update, FYI:

No sending of webmentions, no JS stuff, no custom templates yet.

  • Have tried custom templates for “likes" and “replies”: ✅Works.
  • Have not tried sending webmentions. ❓
  • Loading new webmentions via JS (without jekyll build): ❌ does not work.

The last failing point might simply not work because of misconfiguration on my end. Have only briefly tried. And new webmentions are retrieved correctly, but are not rendered onto the page. Haven’t debugged this yet.

@poblabs
Copy link

poblabs commented Apr 2, 2020

@danielpietzsch @tosbourn Thanks guys for the tips. No luck yet though.

I'm new to this so still unsure what's wrong. Here's what I did...

I added this to my Gemfile

gem 'jekyll-webmention_io', :git => 'https://github.com/nhoizey/jekyll-webmention_io.git', :branch => 'nhoizey-jekyll4'

Then ran:

$ sudo bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from http://rubygems.org/..........
Fetching https://github.com/nhoizey/jekyll-webmention_io.git
Using public_suffix 4.0.3
Using addressable 2.7.0
Using bundler 2.1.4
Using colorator 1.1.0
Using concurrent-ruby 1.1.6
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using execjs 2.7.0
Using ffi 1.12.2
Using forwardable-extended 2.6.0
Using htmlbeautifier 1.3.1
Using multi_xml 0.6.0
Using httparty 0.15.7
Using i18n 1.8.2
Using sassc 2.2.1
Using jekyll-sass-converter 2.1.0
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.1
Using listen 3.2.1
Using jekyll-watch 2.2.1
Using kramdown 2.1.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.17.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using jekyll 4.0.0
Using json 2.3.0
Using openssl 2.1.2
Using string_inflection 0.1.2
Using uglifier 4.2.0
Using link_header 0.0.8
Using mini_portile2 2.4.0
Using nokogiri 1.10.9
Using webmention 0.1.6
Using jekyll-webmention_io 3.3.5 from https://github.com/nhoizey/jekyll-webmention_io.git (at nhoizey-jekyll4@ab70359)
Bundle complete! 1 Gemfile dependency, 40 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Gem list shows this - I don't see it in this list:

$ sudo gem list

*** LOCAL GEMS ***

activesupport (6.0.2.1)
addressable (2.7.0)
ast (2.4.0)
backports (3.17.0)
bigdecimal (default: 1.3.4)
builder (3.2.4)
bundler (2.1.4, default: 1.17.3)
cmath (default: 1.0.0)
colorator (1.1.0)
concurrent-ruby (1.1.6)
csv (default: 1.0.0)
cucumber (3.1.2)
cucumber-core (3.2.1)
cucumber-expressions (6.0.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
diff-lcs (1.3)
em-websocket (0.5.1)
etc (default: 1.0.0)
ethon (0.12.0)
eventmachine (1.2.7)
execjs (2.7.0)
fcntl (default: 1.0.0)
ffi (1.12.2)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
forwardable-extended (2.6.0)
gdbm (default: 2.0.0)
gemoji (3.0.1)
gherkin (5.1.0)
html-proofer (3.15.1)
htmlbeautifier (1.3.1)
http_parser.rb (0.6.0)
httparty (0.15.7)
i18n (1.8.2, 0.9.5)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
jaro_winkler (1.5.4)
jekyll (4.0.0, 3.8.6)
jekyll-feed (0.13.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.1.0, 1.5.2)
jekyll-seo-tag (2.6.1)
jekyll-sitemap (1.4.0)
jekyll-watch (2.2.1)
json (2.3.0, default: 2.1.0)
kramdown (2.1.0, 1.17.0)
kramdown-parser-gfm (1.1.0)
link_header (0.0.8)
liquid (4.0.3)
listen (3.2.1)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minima (2.5.1)
minitest (5.14.0, 5.10.3)
multi_json (1.14.1)
multi_test (0.1.2)
multi_xml (0.6.0)
net-telnet (0.1.1)
nokogiri (1.10.9)
nokogumbo (2.0.2)
openssl (2.1.2, default: 2.1.1, 2.0.9)
paint (0.8.6)
parallel (1.19.1)
parser (2.7.0.5)
pathutil (0.16.2)
power_assert (0.2.7)
psych (default: 3.0.2)
public_suffix (4.0.3)
rainbow (3.0.0)
rake (12.3.3, 12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
rdoc (default: 6.0.1)
rexml (3.2.4)
rouge (3.17.0)
rspec (3.9.0)
rspec-core (3.9.1)
rspec-expectations (3.9.1)
rspec-mocks (3.9.1)
rspec-support (3.9.2)
rubocop (0.80.1)
ruby-progressbar (1.10.1)
rubygems-update (3.1.2, 3.0.6)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (4.0.0)
sassc (2.2.1)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
string_inflection (0.1.2)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
terminal-table (1.8.0)
test-unit (3.2.5)
thread_safe (0.3.6)
trollop (2.0)
twemoji (3.1.6)
typhoeus (1.3.1)
tzinfo (1.2.6)
uglifier (4.2.0)
unicode-display_width (1.7.0, 1.6.1)
webmention (0.1.6)
webrick (default: 1.4.2)
yell (2.2.2)
zeitwerk (2.2.2)
zlib (default: 1.0.0)

However this looks like it's available?

# bundle info jekyll-webmention_io
  * jekyll-webmention_io (3.3.5 ab70359)
        Summary: A Jekyll plugin for sending & receiving webmentions via Webmention.io.
        Homepage: https://github.com/aarongustafson/jekyll-webmention_io
        Path: /var/lib/gems/2.5.0/bundler/gems/jekyll-webmention_io-ab703591929a

Building my site gives the same error:

  Liquid Exception: Liquid syntax error (line 17): Unknown tag 'webmentions_head' in /_layouts/default.html
Traceback (most recent call last):
        37: from /usr/local/bin/jekyll:23:in `<main>'
        36: from /usr/local/bin/jekyll:23:in `load'
        35: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
        34: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        33: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        32: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        31: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        30: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        29: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        28: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        27: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
        26: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        25: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
        24: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
        23: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
        22: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:76:in `process'
        21: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:201:in `render'
        20: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:507:in `render_docs'
        19: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:507:in `each_value'
        18: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:508:in `block in render_docs'
        17: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:508:in `each'
        16: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:509:in `block (2 levels) in render_docs'
        15: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:523:in `render_regenerated'
        14: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:63:in `run'
        13: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:89:in `render_document'
        12: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:159:in `place_in_layouts'
        11: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:196:in `render_layout'
        10: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:122:in `render_liquid'
         9: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
         8: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:60:in `measure_time'
         7: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
         6: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/template.rb:116:in `parse'
         5: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/template.rb:132:in `parse'
         4: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/document.rb:5:in `parse'
         3: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/document.rb:10:in `parse'
         2: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:32:in `parse'
         1: from /var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/document.rb:11:in `block in parse'
/var/lib/gems/2.5.0/gems/liquid-4.0.3/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (line 17): Unknown tag 'webmentions_head' (Liquid::SyntaxError)

@danielpietzsch
Copy link
Contributor

danielpietzsch commented Apr 2, 2020

The problem might be that you run bundle install using sudo – which is not recommended. Try getting it to run with without root privileges.

And I think discussing this over at #137 is the more appropriate issue, since I don’t think this problem is specific to “Jekyll 4” (apart from having to install a specific work where that gem spec allows for install with Jekyll 4).

@poblabs
Copy link

poblabs commented Apr 2, 2020

Still having problems installing as root. I'll re-open #137 with more info there.

@stevenjmesser
Copy link

Unfortunately @nhoizey's fork has been deleted. Does anyone else have a fork of that?

@nhoizey
Copy link
Contributor Author

nhoizey commented Nov 1, 2020

I never managed to make Jekyll 4 work with my multiple dependencies, so I stopped and migrated to Eleventy.

I removed my fork, as I forgot anyone might have needed it, I'm really sorry. 😞

@stevenjmesser
Copy link

I never managed to make Jekyll 4 work with my multiple dependencies, so I stopped and migrated to Eleventy.

I removed my fork, as I forgot anyone might have needed it, I'm really sorry. 😞

That's OK, no one expects you to keep it around :)

@danielpietzsch
Copy link
Contributor

I’m currently using my own fork, which simply updates this repo’s gemspec to signal compatibility with Jekyll 4 and hence make it usable (I think that’s all @nhoizey’s fork did, too).

Feel free to use my fork, too. Here’s what the statement in my Gemfile looks like:

gem 'jekyll-webmention_io', :git => 'https://github.com/danielpietzsch/jekyll-webmention_io.git', :branch => 'jekyll4'

@stevenjmesser
Copy link

Thanks @danielpietzsch, that's a PR I considered raising but I'll try it via a fork!

@aarongustafson
Copy link
Owner

I kept having Ruby/Jekyll issues when upgrading my Mac, so I have moved off of Jekyll and will not be working on this project anymore, going forward. I am going to flag this as won’t fix, but leave it open in case someone else wants to pick up the project from here.

@fancypantalons
Copy link
Collaborator

I believe I've made all the necessary changes to fully support Jekyll 4. As I'm running Jekyll 4 myself and making use of these changes, I'm comfortable calling this issue closed. If anyone runs into any issues, please file a new issue or comment on this one!

@erikw
Copy link

erikw commented Nov 12, 2021

Thank you @fancypantalons!

@kslstn
Copy link
Contributor

kslstn commented Nov 12, 2021

Thanks @fancypantalons! Somehow it doesn't work for me with Ruby 3.0.0/Jekyll 4. I removed all other plugins from my Gemfile, removed Gemfile.lock and run bundle install. It results in:

Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using public_suffix 4.0.6
Using bundler 2.2.16
Using http_parser.rb 0.8.0
Using concurrent-ruby 1.1.9
Using eventmachine 1.2.7
Using forwardable-extended 2.6.0
Using colorator 1.1.0
Using htmlbeautifier 1.3.1
Using multi_xml 0.6.0
Using ipaddr 1.2.3
Using rb-fsevent 0.11.0
Using rexml 3.2.5
Using liquid 4.0.3
Using mercenary 0.3.6
Using rouge 3.26.1
Using safe_yaml 1.0.5
Using string_inflection 0.1.2
Using execjs 2.8.1
Using link_header 0.0.8
Using racc 1.6.0
Using webrick 1.7.0
Using addressable 2.8.0
Using em-websocket 0.5.3
Using i18n 0.9.5
Using httparty 0.15.7
Using kramdown 2.3.1
Using pathutil 0.16.2
Using openssl 2.2.1
Using uglifier 4.2.0
Using nokogiri 1.12.5 (x86_64-darwin)
Using json 2.6.1
Using ffi 1.15.4
Using webmention 0.1.6
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using listen 3.7.0
Using sass 3.7.4
Using jekyll-watch 2.2.1
Using jekyll-sass-converter 1.5.2
Using jekyll 3.9.1
Using jekyll-webmention_io 3.3.5
Bundle updated!

My Gemfile:

source 'https://rubygems.org'
group :jekyll_plugins do
  gem 'jekyll-webmention_io'  
end

gem "jekyll"

gem "webrick"

@erikw
Copy link

erikw commented Nov 12, 2021

@kslstn Ruby 3 is a separate issue: #147

@fancypantalons
Copy link
Collaborator

My Gemfile:

It looks like you're still pulling the gem from rubygems, but until a new package version is published, you're going to need to use the gem directly from github. Try this configuration:

source 'https://rubygems.org'
group :jekyll_plugins do
  gem "jekyll-webmention_io", git: "[email protected]:aarongustafson/jekyll-webmention_io"
end

gem "jekyll"

gem "webrick"

@kslstn
Copy link
Contributor

kslstn commented Nov 13, 2021

Awesome, that was it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants