import and rewrite from https://github.com/bevry/gostatic/issues/1#issuecomment-24488551