Hacker News new | ask | show | jobs
by CrawfordJF 1859 days ago
A Python program to make an embeddable search engine for a static website: https://github.com/joe-crawford/Static-Site-Search

It indexes the site and generates search functionality in JavaScript (the index is just a static JSON file) that can be uploaded wherever JS/HTML/etc. files can be uploaded. I thought it might be useful for people with sites on GitHub pages or similar who don't want to use one of the major search engine company widgets.

Also my back of the envelope calculations were that the simple search index for a small–medium site won't be that big.

1 comments

That’s pretty clever, I guess that for most personal blogs it will be more that sufficient.
Cheers, yes that was the idea!

I looked for a while to find something similar. I'm sure it must already be implemented out there, but to answer the question in the original post about why build something, I couldn't find an easily downloadable "tool" for doing it when I looked (2019) and it was simple enough to be "fun".