I updated Hugo recently and had to make some updates to keep things working. I haven’t been following extremely closely on Hugo development, so this may not all be the absolute best way to do things, but it did work for me.

I noticed that Hugo no longer liked me using straight HTML in my MarkDown files. I opted to go with creating a shortcode to provide the HTML needed on my search page.

So my previous search.md became:

Then I created a shortcode in themes/<mytheme>/layouts/shortcodes/searchpage.html with:

I also happened to update lunr to 2.3.8, which may or may not matter. Nothing in my search.js had to change though.