MKDocs is small though, even combining all the pages it’s not long enough to be a test for longer docs. Saying that, it is still fast and well thought out. I personally don’t see this as a client side task as I’m a js for non-essential behaviour only person.
As search and contact forms are clearly not static for me they are a job for php (+ mysql) or equivalent. As someone from the fully dynamic (dark) side, I cannot see past server side search and contact forms.
I am going to experiment with one idea, but I’m newish to Hugo and don’t know Go so there are limitations. The idea is building a search index during pre-processing of the static site. This seems the perfect time to do it (rather than indexing with PHP server side), because it is at the same moment new content is added.
Once there is an index which matches all content, this can be used either server side or perhaps even as a more efficient client side approach. Only this index file would need searching.
I suppose there is also the possibility on smaller sites of creating pages in pre-processing for each indexed term (if this could be limited only to important words), but this would be loads of HTML pages even for a small site.
If I get anywhere with this I’ll update.