I've been a passionate software developer for almost 30 years and currently a tech-savvy IT manager. I tinker with things like this blog in my spare time, because creating things never lets you go. Here is more about me ...
Integration of Pagefind in Hexo
Adding a low-bandwidth local search to a static Hexo-powered website
From the beginning of this blog I wanted to provide some kind of full text search in order to give my users the ability to find stuff by keyword.
There are a few Hexo plugins that have approached the subject, but it was not really satisfactory and performant. So I relied on the worlds biggest search engine: Google. A search button, which drives out a small input field and with the pressing of the ENTER key the form was sent via GET to //google.com/search
.
The procedure was simple, but also burdened with the fact that I always expose my users to Google. At least until now … :)
Bryce Wray set me on a new path with his post Sweeter searches with Pagefind, in which he talks about his experience with the still fairly fresh tool Pagefind…
--- Liam Bigelow @ pagefind.appPagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure …
Pardon me? A full text search for SSG’s running completely in the browser? It sounded so great that I had to try it right away. And what can I say … it not only works fantastically well, but is also extremely easy to implement. Of course, you have to consider a few things, especially with regard to the SSG Hexo I use, but I didn’t find any big hurdles, also because the tool is so well documented. Let’s see what my implementation looks like…