How would I go about implementing the search feature if I use Hugo and customize this theme?
NOTE: I have developed an API and a database to store the actual job listings with title, tags, final urls, etc. The idea is that I will generate the individual Hugo Posts (of job type) and publish the site as and when new jobs are submitted to the site (form submission).
This means, I can, if needed to implement this, generate a JSON data file containing Job Titles, Locations, and URLs of Single Job Post for the search feature to “Search in” if that’s that way to do it.
Assuming your site is going to be quite large, you’re going to run into limitations (file size) with the Lunr.js approach and may need to look at a server-based solution. A commercial solution that a lot of people like is Algolia.
I’m coming from Nikola which can use Tipue as one of the custom search options so wonder if anyone can share experiences of its usage with Hugo, iow. any pro/cons?
@Shiva in my experience, Lunr is faster than Tipue (and cuts down file size out of the gate because Lunr doesn’t have the jQuery dependency). Here is a decent article on Service Workers with Lunr that might provide some insight…
Well while you’re getting started, you can easily do a client-side solution, then later, when you have a lot of content, a hosted or server-side solution will likely be necessary (service workers are, unfortunately, an unfriendly solution for a large site still, as you’re asking all your users to download a ton of content, even if they don’t use search). I’ve done client-side search using Lunr with several thousand records with a bit of prefetching and it works okay, but at some point you’re going to feel the difference. Hopefully, when it gets to that point, it makes business sense to pull in a more high powered solution.
I haven’t set up an Algolia-based search, but I imagine you can index only what you want (but @rdwatters might know). Their free tier will get you pretty far, if you don’t mind the branding, and it is incredibly simple to add to your site.
Lastly, here’s a video from my Meetup last year. This is a friend from 18F (a group in the U.S. Govt.) who has dealt with some of these issues, and talks about setting up a server-side solution as well as some of the other options: https://youtu.be/zahaMg3X0Tc
No. I more or less gave up on this. The community still seems very niche and “too technical” so there are not a whole lot of Theme developers and customization experts that one could hire.