Netlify, and git woes…
I’ve been meaning to move my site away from Cloudflare for a while now, due to ethical objections to some of their business practices and the fact that were possible, I don’t like support de facto monopolies if I can avoid it (I absolutely hate how much of my life is handed over to Google!). I rated the companies I was considering using thusly:
KeyCDN seem like an OK company, and I can’t remember what the issue was but I found an absolute show-stopper that meant it was a non-starter. Likewise, Google also had issues that I couldn’t solve without significant costs, so they were off the list. I casually mentioned my woes to a co-worker, who told me about another startup called Netlify. It seems they have an integrated CD/CDN platform that you point at a git repository and a website comes out the other side. They have a free offering that’ll do 100GB of transfer per month, and 300 build minutes, that seemed like it’d probably do the job for me, and Hugo is a supported build configuration. What’s the catch?
I haven’t found one yet, it all looks pretty sane. I did have some trouble getting it set up, mainly because my Git repository is a mess having migrated from Pelican to Hugo. I did also have to lock the hugo version to the one I’m using on my Mac for some reason, by setting the HUGO_VERSION environment variable in the build settings… so it might be that when I upgrade Hugo on my Mac I’ll run into issues with my theme, but that’s a problem for another day.
The git problems
Netlify was complaining about some submodules I thought I’d deleted, it turned out I really hadn’t. I had to do two additional things, in addition to deleting the files from the repo (which I’d done ages ago):
- Delete the lines from .gitmodules, which in my case basically just meant completely blanking it.
git rm --cached path/to/submodulewas the missing secret-sauce.
After that, the Netlify deploy went off without a hitch.
I still have to solve what on earth to do with the images I’m hosting - they have a solution like that but it looks like significantly more work than just rsyncing to an Nginx server somewhere with a CDN in front of it. I also need to work out swapping DNS over, but I’ll definitely have to keep looking into this.