logoalt Hacker News

gingersnaptoday at 8:03 PM4 repliesview on HN

Talking about search on a static docs site, has anyone tried a static pre-generated search like https://lunrjs.com/ ?


Replies

fanf2today at 9:01 PM

I use https://pagefind.app/ for search on my website. It’s really easy to add to a static site.

butztoday at 8:44 PM

I think https://develop.kde.org/docs/ is using lunrjs for search, but downloading and parsing almost 2MB file of search data creates some hiccups on website during load.

nicboutoday at 8:23 PM

I use Lunr on allaboutberlin.com. It's simple and effective, but searching the whole content would have required loading more files than I was comfortable with. Therefore it only searches titles and descriptions.

There are probably workarounds, but it's the only limitation I can think of. Otherwise Lunr just works.

joramstoday at 8:10 PM

Basically every Elixir package's docs include search based on Lunr, as it's included by default by ExDoc[1]. It's quite good.

[1]: https://hexdocs.pm/ex_doc/