Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I added this on my blog (https://www.jeremykun.com/posts/) and I even find it useful as replacing 90% of the need for a search bar.

I haven't yet re-added a search feature since I migrated off Wordpress to hugo



I recently added a search feature to my site. I almost cracked open the Algolia docs … and then I just wrote a 4-line form …

    <form action="https://duckduckgo.com/" method="get">
      <label>▷ <input type="search" id="search" name="q" /></label>
      <input type="hidden" name="sites" value="johnnydecimal.com" />
      <input type="submit" value="Search" style="display: none;" />
    </form>
…and now DDG just does it for me. Zero cost, zero hassle.


So that.

I mean, just make sure that your blog is easily consumed by any web search engine.

And in addition to the full non-paginated index, I also have a full non-paginated tags page. Like categories, but with pages showing multiple times if they have multiple tags.

https://blog.pwkf.org/tags.html

My pet feature I'll try to add is sidenotes. It does annoys me to jump back and forth to read them. Even as a popup (wikipedia style), it is still intrusive...


The hugo theme I use has this built in, and the sidenodes change to footnotes if the width is too small. https://github.com/capnfabs/paperesque




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: