Type-on-Strap
Type-on-Strap copied to clipboard
Comment portfolio on _config.yml "Search broken"
Describe the bug
I Work with docker bretfisher/jekyll-serve:latest with this versions:
- Jekyll: 4.3.3
- Ruby: 3.1.5
- Fork about this theme
To Reproduce Steps to reproduce the behavior:
- I fork the theme and go to the
_config.yml - Comment with this
#the lines about portfolio:
#collections:
# portfolio:
# output: true
# permalink: /:collection/:name
- Run the theme and use the search option on firefox
- With F12 I watch this message:
Uncaught Error: SimpleJekyllSearch --- failed to get JSON (/assets/data/search.liquid)
a http://192.6.0.40:4001/assets/js/vendor/simple-jekyll-search.min.js:6
SimpleJekyllSearch http://192.6.0.40:4001/assets/js/vendor/simple-jekyll-search.min.js:6
h http://192.6.0.40:4001/assets/js/vendor/simple-jekyll-search.min.js:6
load http://192.6.0.40:4001/assets/js/vendor/simple-jekyll-search.min.js:6
SimpleJekyllSearch http://192.6.0.40:4001/assets/js/vendor/simple-jekyll-search.min.js:6
<anonymous> http://192.6.0.40:4001/search/:35
- If you not comment the lines of portfolio all work perfect
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Additional context Add any other context about the problem here.
Ok I see where this is from, the JSON is created by looping through the collections. With no collection the JSON might get broken or the liquid template might be failing.
A fix has been merged 👍