Go back Blog

Blog publishing goes brrr

It's been a hot minute since I last made a blog post here. There are a few reasons why, so let's delve into that. 😅

Why you no post?

So I started work on making a blogging portion of my site in mid-2022 and managed to get two posts up: A very stupid hello world post and a post about WASM optimizations for my site. I had gotten it "working" and promptly stopped making posts. All the hallmarks of anyone's personal blog! It's not that I didn't want to do that.

Well.. There are a few reasons why I left it like that:

  1. I didn't have an easy way to publish posts.
  2. Time.

Now, I've finally fixed both one of those problems.

Blog Publishinator 9000

After migrating the codebase for my site to be server-side rendered (SSR) with upcoming changes to .NET's Blazor, I wanted to make a post about the change. It was a bit of a switch going from WebAssembly to server-side rendering, so I wanted to explain all of the dorky details about it (That I'm sure so many people would read).

There's one problem: I never got around to actually finishing the mechanisms for publishing blog posts.

Ya see, I had this smart idea for it all. Instead of spending a lot of time making a web-based content management system (CMS), why not just use the tools I already use? So I had made this plan to use git for maintaining it all. Specifically through a CI/CD workflow through GitHub Actions.

All I needed was something that could process the Markdown files in the repo and push any changes to the database. Enter the, appropriately named, SmallsOnline.Web.Tools.BlogPublisher CLI tool. Great name, right? I thought so too! It's just a simple CLI tool where you pass the path to the file, supply database authentication/connection info (Before you ask, no it's not hard-coded), and it'll push the changes. I had technically started work on it back in December 2022, but, like most things, I just didn't have time to work on it. Yes it's very simple, but my ADHD brain jumps from one thing to the next. Add on the fact that I'm constantly busy at work and that can drain me from wanting to work on personal projects.

So now it's all in place and that's how this post got published.

Why go this route?

As I mentioned previously, making a dedicated CMS for all of this would have been a waste of my time. These are the reasons why I decided to have it controlled through a git repo on GitHub:

  • I'm a dork.
  • I can use the tools I already use.
    • On my laptop, I can use Visual Studio Code. Yeah, I know that can be yucky to some people; however, for me personally, it's a great Markdown editor.
    • On my iPhone or iPad Pro, I can use iA Writer or Runestone to write the posts. Then I can use Working Copy for performing all of the git operations.
  • I can take advantage of version control.
  • I can have two places for my posts:
    • On my website.
    • On GitHub (Or, if I were to move off of GitHub, other cloud-based git providers)

That last reason is a bit of a sticking point for me. If something were to happen to my website and/or my website's database, I can at least have a backup location of them. The repo is currently (Has been for a long time lol) set to private, but it'll eventually be public and you'll be able to access it from here.

Let's wrap this up

Wow! You made it all the way here? Even after reading that snooze fest?

Now that I've finally got everything in place, I'll be posting a lot more. I've got some extra things I need to do, like setting up a RSS feed and figuring out the best way to make attaching images a bit easier; however, I've got something to work with now.