-
Notifications
You must be signed in to change notification settings - Fork 205
[bug] Error: SimpleJekyllSearch --- You must specify a json #36
Comments
Thanks for reporting, and sorry for the inconvenience :( Could you please post the code how you initialize the library? |
If this is related to the initialising the plugin then I might have had the same issue basekit/docs.basekit.com#89 |
@christian-fei: Here you go. =) SimpleJekyllSearch({ |
Ah i see, it seems you're missing the 'json' field (instead of dataSource). https://github.com/christian-fei/Simple-Jekyll-Search#json-stringjson-required Please let me know if it works, and sorry for the waste of time |
@christian-fei: Oh, I didn't notice that. It works! Thanks =) |
@christian-fei that'll explain why my version breaks when I update. Could this be documented somewhere for people who upgrade their version of the package? |
@christian-fei would you please help to take a look my code? It just keep with the error of 'failed to get JSON'(as the the screenshot state above).
and my css code is as following:
Thanks in advance! |
@lengerfulluse: Did you add simple_search_filter.rb file to _plugins folder? |
@lengerfulluse I think it's because of an invalid JSON, Simple-Jekyll-Search/src/JSONLoader.js Line 14 in 77c80aa
Try to validate it here: http:https://jsonlint.com/ |
Wow, It did was caused by the setting of full-text search, which caused a invalid JSON. |
Sorry guys, I just found that it only work in localhost( i run |
First of all, thanks in advance for your code! Here the problem still remains...
Here the way I initialize the plugin: SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '/search.json'
}); And this is the well-formatted json... Any idea? |
I was getting the same problem, @kentoo -- adding the plugin to strip characters solved it for me (it turns out I had some |
It's true! Thanks a lot. |
Thanks @una ! |
Like OP recommended: christian-fei/Simple-Jekyll-Search#36 Checked the json on: https://jsonlint.com Let’s see what it does.
🎉 Finally, the malformed JSON was a problem like OP wrote: christian-fei/Simple-Jekyll-Search#36 (comment) Thanks, man! 😎 @christian-fei Both for the plugin _and_ the support! 👌
I changed recent version updated on github and I get this error message.
My json setting is just default. Please check it.
The text was updated successfully, but these errors were encountered: