Darren Xu Blog

Creating a Github profile readme with Astro blogs


Intro

In this blog post I will share how I created a fun Github readme feature that listed the most recent blog posts from my blog run with Astro.

Setting up a Github readme

Github has a feature that allows you to create your own readme in markdown.

Basic steps to create:

Setting up the Astro blog

If you have an Astro site you can install the Astro rss plugin. Make sure you configure astro.config.mjs to point to your domain. The rss feed generated will have the url: your-domain/rss.xml.

Setting up the Github workflow

Follow the instructions from this repository to add a Github action into your repository. Replace the rss link with your-domain/rss.xml.

By default the action runs every hour but I changed the cron pattern to 0 1 * * * to run every day once at 1am.