I’m on holiday, so I have some time to play with code more than usual. Some time ago, for this blog, I wrote a simple script that converted inline markdown links to references1. I wrote it in Ruby, created a Docker image for it, and ran it before each new piece of content was published. I wanted to make it as simple as possible, so other people might use it as well (Docker, no dependencies, available to pull directly from the registry, it runs through Makefile command, etc.).

It worked, but I wasn’t happy with it. I thought that making it available through Homebrew would be a better idea. And when doing this, I also wanted to experiment a little with Go and give Github Copilot a chance (as my coding skills are a bit rusty).

I’m happy to say that I was able to achieve all my goals. All the code is available in the markdown-tools repo, it’s written in Go, there are some tests (thanks, Copilot!) and it’s available through Homebrew. I still have a lot to do before I’ll mark it as a 1.0 release, but it’s a good start. I had a ton of fun writing it; I struggled the most with writing the right regexes:)

Outcome

To summarize the whole gig:

The best part for me is that I can currently focus on improving the tools themselves, fixing some edge cases, and so on, while the release process is automated. I no longer have to worry about it! 💪

Resources

Some useful sites and article I found that helped me to get through the process:


  1. I’m not exactly sure why I wanted to have it this way, but that’s a topic for another post. ↩︎