Building an Automagically Updating Personal README for GitLab and GitHub

If you land on someone's profile on a source hosting platform, you're likely to be interested in who they are and a bit more of what they like, and you may end up clicking out to their personal website, if they have one.

It's not new that it's possible to now add a README to your GitLab or GitHub profile, so your profile looks something like this:

Screenshot of Jamie's profile on GitLab, with the banner information about him, a short description and some social links, followed by his contribution graph, and then the rendered README with more text about himself, including information about his current job, and some recent blog posts

This allows you to give a bit more context for who you are as a person, what projects you like working on, and anything else really. But as good as static content is, it does put a bit more onus on you to make sure that you update it regularly.

However, because the it's a repository hosted by GitLab or GitHub means that you can use tools like GitLab CI or GitHub Actions to automagically update the contents.

I've seen Brandur write about this in the past, who based it on something Simon Willison did and blogged about, and both of their approaches is pretty great to making sure the content stays relevant.

As the screenshot above shows, the README produced has some information like my current job (which admittedly doesn't change very often) as well as the most recent blog posts on my site, and even the last book I read, or how many steps I took yesterday. This is all automagically generated from my website, which in a very IndieWeb-y fashion, is the source of truth.

What I particularly like about my approach is that it uses the Microformats2 markup that's already on my pages, as part of interoperability with one of the open standards that the IndieWeb community own, and I have been using for some time now. This has meant that there's absolutely nothing I've needed to do to get this data readily available, and I've been able to populate a lot of interesting things in the READMEs, purely by interacting with the metadata on posts that I use to track my life.

You can check out what it looks like on my GitLab profile and on my GitHub profile, or on readme.jvt.me which is a platform agnostic version.

The automation is built from my first real Go program, readme-generator which uses Will Norris's awesome microformats package for Go to do the heavy lifting.

It was fun to write a little bit of Go to solve it, and I'm sure I'll come back to improve both the code and the content over time.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#go #github #gitlab #readme.jvt.me #microformats2.

This post was filed under articles.

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.