Adding search to homepage

Hello there,

I am currently working with the Doks theme and tried to implement the search function on the homepage. While the search box is displayed perfectly fine and the index.js script is loaded as well, I have a problem with FlexSearch. When I take a look into the network analysis the error: ‘FlexSearch is not defined’ pops up. I’m not sure why this module isn’t loaded, and the search function works fine when I’m in the documentation, but not on the homepage.

Thanks in advance

If I am not wrong, you need to add "Homepage" to searchSectionsShow = [ ] in the /config/_default/params.toml file. So, look up that code under [options] and your final code should look like this

searchSectionsShow = ["HomePage"]

Thanks for the suggestion, but unfortunately that didn’t solve my problem. Somehow the FlexSearch module still doesn’t load while I’m on the Homepage.

flexsearch_error

Documentation will be added soon to the Doks website. Do you have a repo you could share ?