Skip to main content
Random Coding

Photo by Stable Diffusion

In Search of a Better Writing Experience

I've written about my writing setup previously, so I won't go into details here. I've been running it for a couple of years now and have not written much at all! Part of it is because I was too lazy to write. But part of it was because the steps required for publishing a post were numerous and too cumbersome.

The Proof is in the Pudding #

The Gutenberg editing experience is great and I had no problem writing in it. I enjoyed writing using the local installation of WordPress. And the blog was fast, secure, and didn't cost any money to host. The result was something I could work with.

The problem was in the publishing process itself. Whenever I wanted to publish a new post:

  1. Boot up my PC, because that's where I had the instance hosted.
  2. Boot up the dev environment inside Docker.
  3. Write the actual post. And save it.
  4. Generate the static site. This took a while with the plugin I was using.
  5. Push the static content to GitHub so the new site is deployed by Netlify.

Other than steps #3 and #5, everything was sub-optimal and added pain points to my flow.

Artist's rendition of my face when I have to create a post Artist's rendition of my face when I have to create a post

These pain points eventually build up to the point where I just don't even bother posting. In addition to these issues, I also had to deal with these flaws in my system.

So, all in all, not fun.

A Better Way #

Since I'm in a state of transition right now (moving countries, more on that later), I thought this was a good time to play around with this setup. After tinkering for a while, I came up with a Rube Goldberg machine-like process to make writing painless.

  1. Convert my blog to 11ty
  2. The content is still hosted on GitHub
  3. I write my post using markdown on a web app or offline
  4. I email the post to a special email address that is setup for receiving emails on AWS SES
  5. AWS SES takes the email content and dumps it in an S3 bucket
  6. A lambda function is configured to listen to create events on the S3 bucket
  7. On trigger, the lambda function clones the repo, downloads any linked images, and creates a new folder structure with the post and images
  8. The post is then updated to point to the local versions of the image and then the post is committed to github
  9. The commit triggers a build in Netlify
  10. The build is done by 11ty and generates a fully functional static site
  11. Netlify deploys the new version of the build

While this setup is a little more complicated than the previous setup, that complication is upfront and one-time. Once I have it in place, then the process of posting becomes as simple as sending an email.

It's quite simple, really! It's quite simple, really!

It also decouples the act of writing the post from the publishing of it. This means I can write anywhere I want and I can keep iterating on that till I find something that works for me. But none of the other steps would need to change, so I have fewer points that cause friction. How do I know this? Because I've already got most of it working:

  1. The website has already been converted to 11ty and I have all the markdown files.
  2. The lambda function is running and deploying to GitHub.
  3. The SES email is configured and triggerring the correct events.
  4. I just need to clean up the lambda code.

As part of the process, I'll write about each component and detail the steps I took. If you're reading this post, then I've already got the process working and things should (hopefully) be running smoothly.

Check back soon to read the next part in the series!