Hacker News new | ask | show | jobs
by tuesday20 2361 days ago
Those using static site generators - how do you handle search?
3 comments

Outsourcing it to a search engine is pretty easy. I do something like the following for DuckDuckGo:

  <form id="search" method="get" action="//duckduckgo.com/">
    <input type="text" name="q"/>
    <input type="hidden" name="sites" value="mywebsite.com">
  </form>
Google Search, JS solutions like lunr.js, paid options like Algolia...
Check my comment on this thread: https://news.ycombinator.com/item?id=21978989