2 posts

Blog Theme Update

I've moved from the default theme. I was using it even with the old site. I found a really sleek theme called StayPuft. It just looks like the author hasn't updated it for Ghost v1 yet. I forked the repo, which is available here. If you're having trouble with StayPuft, perhaps give my fork a try. Keep in mind it has a different color scheme.

There were a few technical issues I had to overcome with this theme. They were quick to resolve and I had a good time doing it.

max_body_size in nginx.conf

I hadn't set this. I was trying to upload this theme but the size is too big (2mb). So, I had to update nginx.conf's http section and include client_max_body_size 2m;. The default is 1mb. This file is located in /etc/nginx. I am running nginx in a docker container so I just had to edit the file in my docker volume and restart nginx. It was super-simple.

obsolete helpers in Ghost

The main reason I had to fork the theme was because it was written for v.11. In v1 the ghost team changed some helpers involving images. The absolutely awesome part about it is that when you upload a theme, ghost tells you all the parsing errors in a great format that's easy to debug and fix. I am so very impressed with ghost's features.

In closing, I'll be tweaking this theme as I go. I don't like where the search results are for ghostHunter. I want to add some features and adjust the colors as well. The repository will stay current!

Welcome to blog v2!

Welcome to blog v2!

I committed the cardinal sin of devops: upgrading without backing up. It was quite unfortunate. Sometimes I think, "it's just my site, who cares," but I lost a few good hours of explaining something really cool.

To be fair, this is the first time it's happened for real. In prior iterations, I've backed up my database and restored it. This time I figured since the database was persisted on the filesystem, it would just start back up ok. Upon closer inspection, it appears my ghost installation, at some point, reverted to a vanilla install and started using the sqlite local database again. I'm not exactly sure how, but it started back up from scratch, so that .db file was brand new when I finally inspected it. Half my posts were in that while half were in a mariadb database. I have the mariadb posts. I don't have the sqlite posts. Those, I suspect, are gone. So, backup and backup some more. Thinking "well, my data is persisted" didn't cut it. An updated image started up and cut that theory down pretty quickly.

The good news! Yes, there's good news! I have updated containers running. I sincerely hope I've learned my lesson and will read release notes before docker pulling any new containers. I'll re-post my configuration with updated settings. It's worth reviewing. A few things changed since updating. For the record, I've updated all containers along with the docker engine. So pretty neat. And I've added a few perks. This new version of Ghost is pretty snazzy so I don't regret much.

I might have to invest in a dev environment, even for this dinky site. Making changes directly in production is never a good idea without testing it first. Docker makes it easy, too. I should post a set up of that. More to come...