Adding Search to my Blog

Written By: Jake Bauer | Posted: 2020-07-03 | Last Updated: 2020-07-03

As my collection of blog posts keeps growing, it is becoming increasingly apparent to me that I need to offer visitors some way to search through my previous posts. It will also be a lot easier for me to find an old post where I half-remember the title and have some idea of the content by being able to search for it instead of needing to scroll through my list of previous posts.

For those reasons, today I have added a way for people to search my blog posts. The feature is available through a link on the blog page. Go ahead, check it out now.

See? It took all of 30 seconds to implement and I didn’t even have to program anything! All I did was go to duckduckgo.com, type in site:www.paritybit.ca/blog into the search bar, hit Enter, copy the URL, and link to that URL from my blog page. By using this method, I can still avoid having any JavaScript, back-end scripts building the search results dynamically, or complex search solutions such as ElasticSearch.

It really is super easy to add search to your site, even if all you want is a simple static site.

This is my fifty-ninth post for the #100DaysToOffload challenge. You can learn more about this challenge over at https://100daystooffload.com.