Remaking this site yet again


So, I a few months ago I moved by blog from Site5 to SiteGround. It wasn't too hard as both are basic LAMP/CPanel ISP. The reason I moved is Site5 didn't support letsencryprt can many sites are started to ban non-HTTPS. For example you can not include a script on JSFiddle unless it's HTTPS. I was using scripts from my site and they stopped working because of that. I waited nearly a year for site5 to add support (they said they were looking into it) but it became clear they were't going to do it.

So I looked around, tried Dreamhost first but they had issues with my needs. I think they required running my DNS or something which was out of the question. I ended up at siteground. It's setup was also a little strange but I got things working moved 4 sites over.

Then, about 10 days ago I wrote an article that got some traffic and all of a sudden I got an email from siteground that I was ay 75% of my service limit and that might site would be shut down if it hit 100%. Why I didn't notice this before but that's when I found out their limit for the plan I signed up for was only 20k hits. I have 2500 posts, many with lots of images. I have no idea if they count every image as a hit but effectively a few scans by seach engines and I'd hit my limit.

Just because I didn't want my site to go offline I paid them to double the limits to 40k hits. That's when I got the message it might take 3 days before they could do it. Seriously, you tell me you might take my site offline and when I pay you not to you tell effectively tell me you might take it offline anyway!?!?!

They did get to it fairly quickly despite the "up to 3 days" message but they did end up taking my site offline because instead of just upping some limit they moved my site to another server and because they aren't doing intellgent routing that changed my IP address and took the site offline.

So, fuck that! Gees! WTF!? How do these shitty ISPs stay in business?

With that and the fact that if I manage to write a popular post they'll yank the site down I decided to bite the bullet and try switching to a static site using something like Jekyll and hosting on a VPS from Digital Ocean. They won't yank it down, they'll just charge for bandwidth. Also their limits are way higher than those typical LAMP sites.

But ... converting this blog was way more work than I thought it was going to be. I've worked on nothing else every day for about 10 days and I think I'm stil not 100% done.

First I tried using some plugin for wordpress that was supposed to export to jekyll but of course it didn't work. In fact it was deleting stuff. I spent time setting up XAMPP and trying to get the site to run there so I could more easily play with the exporter but something wasn't working. I also really wasn't looking forward to working in php. I know XAMPP has worked for me before but why it wasn't working now I have no idea. I even tried downloading their new version that runs in a VM. I got the site over and the database imported but I couldn't get wordpress to come up for some reason.

So, I exported the db to json and starting writing my own exporter from that to jekyll. At some point I realized jekyll wasn't going to work for me because I have 2 blogs that share data, something jekyll doesn't seem to handle. Jekyll was also failing in a bunch of places with things it didn't seem to support like inline html in the middle of some markdown etc...

So, finally I decided to just use the code from webglfundamentals which was already reading markdown.

That's was mostly working but converting 20yrs of posts, writing the rules to try to automate the conversion took quite a while. And of course each time I fix one edge case it breaks some previous edge case. It only has to work once or just get close and I can manually fix the rest but after a week I was about 1/2 way through. I'm pretty sure I missed some pages because I made a big change where I tried to extract all the HTML from the markdown for some post I was having issues with before I realized that would never work when I hit another post that showed why. So I removed that change but I don't remember which post I originally wrote it for.

When I got it all done and fixed the 20 or so posts that looked like they needed manual intervention I then needed to setup a webserver, setup a repo, and write scripts to make it auto update from a git repo.

I ended up using Caddy but like all webservers the first time requires a bunch of time learning how to get them configured with their cryptic config systems. Sometimes I think it would be better if they just gave you a library and a lot of examples but let you just use a normal full programming language instead of a limited and confusing config language. I needed to get some silly redirects working. I also have a few hundred redirects from old URLs since before I moved it to wordpress. And I had to try to get feeds working correctly. I hope they are still working.

I started to wonder if I should just delete this blog. At this point it's more for me than anyone else. Maybe I should use medium or something and just not care about doing my own thing or any kind of backup etc..

I'm not sure how I'll like not having the wordpress interface. It was nice to just be able to login, edit preview, edit preview. As I have this new site setup I can't do that easily at the moment. There is no preview unless I have my laptop and run the build scritps so no posting from an iPhone or iPad, not that I've ever done that. It was simpler to log in then I think it is now.

I can use github to edit or add posts but I have no way to preview. Maybe I should setup a preview site but that's just more work.

I also actually wanted to pay an ISP to keep the server running and up to date but staying on wordpress meant dealing with having to manually update wordpress every month or so which was a PITA.

My hope is that given it's a static site now there really isn't much to update so I'll cross my fingers.

I also lost control of my comments. That probably doesn't matter but originally had my own comment system, then I ported those comments to wordpress. Then when I got too much spam I copied those comments to disqus but disqus magically copies the comments back into your wordpress DB so even if they disappear or get sold and change how they work you still have your comments.

But it seems like that ship has sailed as in I should just look at comments as ephemeral. Or who knows. If it ever comes to that maybe they'll have a way to export the comments. Or more likely I should just let that go.

In any case the site is now static. I'm sure there are issues and there's still a few more things I need to do but ATM it seems to be working.

No, We are not living in a Simulation
"Science Vs." Science