I, like many others before, am trying to implement lunr search on my hugo site.
I have, by following many of the posts on the topic, built the necessary json file for input to the index builder. I wish to pre-build the index and include that prebuilt index in the assets of the site in /public.
There are plenty of js code examples for pre-building, but as far as I can see, there is no way to have the pre-build occur during the build process, so that the index is bundled with the site.
Is there a way that I have just missed?
How do others go about this?