GitHub’s new profile page README feature is having the wonderful effect of bringing some personality to the MySpace pages of the developer internet. Though Markdown lends itself best to standard static text content, that’s not stopping creative folks from working to create a next-level README. You can include GIFs and images to add some motion and pizazz (they’re covered in GitHub Flavor Markdown), but I’m thinking of something a little more dynamic.

At front and center on your GitHub profile, your README is a great opportunity to let folks know what you’re about and what you find important and to showcase some highlights of your work. You might like to show off your latest repositories, tweet, or blog post. Keeping it up to date doesn’t have to be a pain, either, thanks to continuous delivery tools like GitHub Actions.

My current README refreshes itself daily with a link to my latest blog post. Here’s how I’m creating a self-updating README.md with Go and GitHub actions.


Reading and Writing Files With Go

I’ve been writing a lot of Python lately, but for some things, I really like using Go. You could say it’s my go-to language for just-for-func projects. Sorry. Couldn’t stop myself.

To create my README.md, I’m going to get some static content from an existing file, mash it together with some new dynamic content that we’ll generate with Go, then bake the whole thing at 400 degrees until something awesome comes out.

Here’s how we read in a file called static.md and put it in string form:

#technology #programming #tech #github #developer

Go Automate Your GitHub Profile README
1.25 GEEK