I’ve created a simple script for myself to reduce writing friction.
I saw a tweet from Simon Willison earlier this week pointing to Matt Webb’s 15 rules for blogging, and my current streak. I decided that I would also like to try to write more, and one of the things getting in my way was the slight friction in starting a new post. I use GitHub Pages and Jekyll behind the scenes, and my posts are in Markdown, one file per post (I like the simplicity of this, it reminds me of Rael Dornfest’s Blosxom).
So running the risk of being accused of a small amount of yak shaving, I wrote a very basic script (with Simon’s “perfect is the enemy of shipped” in my head) that I could use to start a new post quickly and pushed it to my dotfiles repo.
The script is newpost and is very basic, having taken me less than 10 mins to write. That’s sort of the point. I may refine it as I go on, in fact I probably will; not least because the function that generates a filename from a post title is very basic indeed, but also because I would like to perhaps create a new tmux session for editing and running Jekyll locally for test rendering. But it’s good enough for now, and in fact I kicked off this post using it, by typing:
> newpost reducing writing friction
whereupon I landed in Vim with this in the file, all ready:
--- layout: post title: Reducing writing friction date: '2020-09-11 17:07:17' ---
That’ll do for now!
Incidentally, I’m already on a small path to writing more, having adopted Simon’s Today I Learned (TIL) mini-post approach. I’ve written a few TIL posts on this blog recently, such as TIL: The open square bracket [ is an executable, and I feel very freed by the constraints.