-
Notifications
You must be signed in to change notification settings - Fork 8
Error on 'jekyll build' after adding and configuring the plugin #37
Comments
Looking into this...not really clear where the error is actually coming from. Will continue poking at it.
|
Not sure if/why it would make a difference, but do you get the same thing on |
Yup, same issue with Also,
|
Hmm, shot in the dark here, but this seems to solve many unexplainable Jekyll plugin problems: Try adding a block like this to your
Here's how we do it on 18f.gsa.gov (where we have this search working). |
Nope, no luck with the exclude. |
Hey all: Didn't see the repro codebase at the top of the issue, so I made one as well: https://github.com/jwworth/jekyll_pages_api_search_issue_9 It contains a WIP branch called 'no-error' that avoids the error, by uncommenting this line: https://github.com/jwworth/jekyll_pages_api_search_issue_9/blob/377d7b0cf92ba222e4f345da3c17b36ed0317554/_config.yml#L39 My repro command was I think this line of code in Jekyll is the source of the problems: https://github.com/jekyll/jekyll/blob/master/lib/jekyll.rb#L161 The method is called multiple times from here: https://github.com/jekyll/jekyll/blob/master/lib/jekyll/site.rb#L369
|
I have exactelly the same error. Did someone solved it ? Each member of
|
So i think the problem is in the ruby pluqin for jekyll. |
Just ran into this same problem with @maya as well; there seems to have been a change in jekyll/jekyll@v3.1.6...v3.2.0 that broke the plugin. Will try and investigate when I can, but pull requests are welcome 😁 We may also need to start testing against multiple versions of Jekyll... #39 |
In other words, a (temporary) workaround is to set |
Started on a fix - submitted at #41.
I believe the second one is the search results page. |
@afeld huh, is that why AccessLint is posting errors twice 18F/accessibility#170? |
👋 I'm looking at updating the version of Jekyll that |
I don't know that it was fully resolved but capping the version seems to be a solution. If you're on Federalist, though, you might run into difficulty. We use Jekyll 3.3.0 on 18f.gsa.gov and search is working. I suppose it's possible there was a problem with 3.2 that broke search and something in 3.3 that fixed it? |
Just updated the test case to try Jekyll 3.3.0 and then the latest release, 3.4.3. I'm still seeing the issue on both versions, running locally. :( |
Related issue: jekyll/jekyll#5145 (comment) In short, it seems this is a bug that Gem-based themes encounter with new versions of Jekyll, manifested as @jwworth noted above. The Jekyll issue he noted is triggered when the EDIT: Forgot to add: The issue I linked to is for symlinked gems (and has a fix associated with it), but is indicative of what I'm seeing locally. |
Just noticed: The
|
Um, so I cribbed from the monkeypatching of Jekyll that @hbillings mentioned above, and used the same technique to monkeypatch Jekyll again to work around the exception that's being thrown. You can view the source but it's short enough that I can just paste it in here: module Jekyll
class << self
alias_method :orig_sanitized_path, :sanitized_path
# This is a horrible workaround for:
# https://github.com/18F/jekyll_pages_api_search/issues/37
def sanitized_path(base_directory, questionable_path)
if questionable_path.nil?
questionable_path = ''
end
orig_sanitized_path base_directory, questionable_path
end
end
end Just plop that into a |
Rather than trying to fix this directly, I think #28 is the cleaner way to go, and would sidestep the issue. |
I think I am stuck here too. Any fix? |
Added and configured the plugin as described in the README. I get this error when running
bundle exec jekyll build
afterwards.Jekyll 3.2.1
Ruby 2.3.1
Node.js 6.7.0
Minimal test case here, it is a fresh Jekyll site with the jekyll_pages_api_search plugin installed: https://github.com/jfredrickson5/search-test
Site builds and renders normally if I remove the plugin from
_config.yml
.The text was updated successfully, but these errors were encountered: