I’ve lurked here for a while, but this is my first actual post. I’ve recently started trying Algolia for for search on a new site, and hate anything manual about the upload process. So I whipped up a bare-bones uploader than can be called as part of an automated build.
It lives here: https://github.com/duckpuppy/algolia-hugo
It’s pretty simple - create your config file (or set the appropriate environment variables) and point it at a
.json file. It will DELETE the contents of the index it’s pointed at and upload the new file in it’s place (because I hate the idea of deleted or modified content remaining in the search index). I’ve looked at implementing object IDs in my templates, and if I get that working I will probably update the tool to update instead of delete/upload (with optional wipe functionality for occasional housecleaning).
It’s written in golang, like Hugo. I haven’t put up any releases yet, but
go get github.com/duckpuppy/algolia-hugo should get you a working binary. If anyone has a chance to use it, let me know how it works for you. PRs and feature requests are welcome, but my time to work on this is limited. I will strive to accept PRs as quickly as I can review them, but any feature requests will probably end up being a weekend code fest.
I hope to polish this up and get some actual releases on Github soon, but I want to get some usage feedback.