Type-on-Strap icon indicating copy to clipboard operation
Type-on-Strap copied to clipboard

Comment portfolio on _config.yml "Search broken"

Open Vctrsnts opened this issue 1 year ago • 1 comments

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:

  1. I fork the theme and go to the _config.yml
  2. Comment with this # the lines about portfolio:
#collections:
#  portfolio:
#    output: true
#    permalink: /:collection/:name
  1. Run the theme and use the search option on firefox
  2. 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
  1. If you not comment the lines of portfolio all work perfect
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots github

Additional context Add any other context about the problem here.

Vctrsnts avatar May 22 '24 15:05 Vctrsnts

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.

sylhare avatar May 22 '24 21:05 sylhare

A fix has been merged 👍

sylhare avatar Jul 25 '24 20:07 sylhare