Geoffrey Wiseman

Middleman Extensions for S3, Analytics

I'm still pretty happy with Middleman for this site, and I thought it was time to share some of my experiences with Middleman extensions. I haven't made any yet, nor have I needed to use that many, but I have a couple of recommendations.

S3

If you're hosting a middleman site on S3, and you need to update it regularly, use middleman-s3_sync. It does a good job of getting your site updates up to S3 with a minimum of fuss and ceremony.

I started with middleman-sync, but it had a tendency to write every file to S3 on each sync, which it does quickly, but it still seemed like overkill, so I moved on to middleman-s3_sync, which doesn't do that. When I had a minor issue, it was quickly solved.

There's a longstanding rewrite to middleman-sync, which might solve its "write always" strategy.

Google Analytics

I had been using my own simple Google Analytics setup in middleman until today, but I hadn't bothered to set it up so that the script wouldn't appear in development mode, which, with live reload, can throw off your counts significantly.

While it's a pretty easy change to cause your script to load only in build mode, it seemed like a good time to try out middleman-google-analytics. I can't truly recommend it yet, because I've only just started using it, but it was pretty easy to adopt, and I haven't had any real issues with it (although I did see one area for possible enhancement).

It's pretty simple, but it looks decent, and I'm pleased that I didn't have to do it myself, and that the code for the extension looks simple and thin.