October 23, 20244 minutes723 words

Hello again, world!

Yet another blog redo boogaloo

Welcome to the late 2024 reboot of my blog. This version looks, and more importantly, works, very differently than previous iterations, but in ways that I like.

Firstly, it's powered by a new custom-written static site generator. All files are statically generated, meaning no more database or dynamic content (which I've never used or needed in a blog anyway). I've wanted the site to be static files for quite a while anyway (hence why I initially started writing the generator and realized later that I accidentally made a static site generator). While I have enjoyed using Ghost, the v5 requirement to use MySQL 8 and drop support for SQLite starting causing my poor server to slow down to unusable levels, along with the database consistently crashing. While the problems could have been solved by upgrading my server's resources, there was a bigger reason for the switch from Ghost.

Ever since I started my first blog in 2010, I have written blog posts from my laptop. However, over the last few years, my workflow has shifted from my laptop to my phone. When I used WordPress.com, there was the (Android!) WP.com app that I sometimes used. I do not recall if there was a mobile app when switched to Medium. Ghost used to have an Android app, but it died with Ghost v2 or v3. (iirc). I considered using Grav but decided against it because I did not want to write a custom theme. I did that once with a WordPress.org site and, possibly because of my code (never confirmed), the site ended up getting hacked. Switching to iOS a couple of years ago removed all my mobile publishing options. For this new iteration of my blog, I needed something that I could use to write from both my phone and laptop and everything stay in sync.

I also got spoiled by the very nice visual editor from Ghost. Despite wanting a flat file site, I also wanted the rich text editing experience, something that typically would only be available on a desktop. Recently, a junior developer at work introduced me to Obsidian, and I realized that it could the missing piece for this aspect. Discovering the community git plugin, and that it worked on iOS, sealed the deal.

My workflow for this blog is now as follows:

  • I use Obsidian for writing, either on my phone or laptop, in Markdown (the site generator supports both)
  • All files are synced to a private GitHub repo
  • A webhook is set up to my server for listen for push events
  • A webhook service I started writing in 2019 receives events, which kicks off the following actions:
    • Make sure the commit contents isn't only draft post changes
    • Pull the latest changes
    • Run the static site generator to build the site with the changes
  • A similar webhook event is set up for the site generator itself, so the site can be rebuilt whenever the generator is updated
  • Yes, I may have a bit of NIH (Not Invented Here) syndrome 😅

I still have plenty of things to work out, including:

  • Deploying files (mainly images)
  • Internal links
  • Changes to the site design
  • Web server set up
  • Working out any design things and missing content elements that I want

I will be porting all posts from my last blog into this one so there's no content loss. I once had my server become corrupt and I lost posts that I very much wish I still had, so I'm going to make sure that doesn't happen again.

It was further suggested to me that I have a way to notify people when a new post is available, so an RSS feed (either XML, JSON, or both) and maybe an email containing the post content may be added in the future too.

I ditched the Docker runtime for this server iteration. While I like containers and will continue to use them (especially for some stuff that maybe one day could be a small business for myself), I ended up going the virtualenv route and creating virtual environments for each application. I may go back to server-side containerization one day, but for now, I'm good with this approach.

Overall, this has been a fun learning opportunity for me, and I'm excited for this iteration. It means I am likely to blog more since I can now write from my phone (despite this post mainly being written on my laptop, lol). I already have stuff I'd like to share with y'all. 😊