If you go to https://github.com/peterbe it lists the most recent blog posts here on my blog. The page is rebuilt every hour using GitHub Actions. This blog post is about how I built that, so that you can build something just like it.
In case you don't have access or it's quicker to look at a picture, this is what it looks like:
The way GitHub profiles work is you create a GitHub repo that is in the same name as your username. In my case, my username is peterbe
, and the repo is thus called peterbe
. So, it's named https://github.com/peterbe/peterbe. It has to be a public repo for this to work.
In that repo you have a README.md
and mine looks like this: https://github.com/peterbe/peterbe/blob/main/README.md?plain=1 If you look carefully, the Markdown in that README.md
contains:
<!-- blog posts -->
...
<!-- /blog posts -->
By default, HTML comments work in GitHub-flavored Markdown just like they do in HTML.
Then, I have a Node script that finds that inside the file and replaces its content with a list of Markdown links.