A smarter 404 page.

Voodoo found a broken link referring to a one of my posts, on Quora. Given that I have changed my site generator a bunch of times now, it is quite possible that there are other broken links at various other places. So, I implemented a smart 404 page for the site, yesterday. It is very similar to something I came across on brettterpstra's site. I just hooked up fuse.js with Nikola's tipue-search plugin's output file. My glue code essentially, just figures out the search term from the URL, performs a Fuse search on the json data created by Nikola's search plugin, and returns a list of top 5 results. It just took me about an hour to write, but is pretty useful, I think.

Show comments