How to Add Your Recently Published Medium Articles to Your GitHub Readme
More About This Plug-In

I’m using Vercel for the static hosting and the serverless function to retrieve the recent articles. I might be able to add a custom domain, but that’s for later.

I’m using an RSS feed from Medium. You can get your RSS feed from Medium by entering this URL: https://medium.com/feed/@yourMediumUsername.

Then convert it to JSON using API RSS to JSON:

Make it generic so everyone is able to use it.

To make it generic so people can directly pass their Medium username to the serverless function:

https://github-readme-medium-recent-article.vercel.app/medium/@imantumorang

I need to make the folder of my serverless function as follows:

└── medium

└── [user]

└── [index].ts

The [user] directory is required so I can make the username dynamic. I was stuck on this problem when I was making the plug-in. Actually, I can create it using query-param like ?username=@imantumorang , but from my experience and keeping REST in mind, making it path-param is the proper way to tell that the param is required. Also, I want to keep the experience the same as when you’re visiting your Medium profile (e.g. medium.com/@imantumorang).

I knew that comments in the Medium articles would be added automatically to the RSS. To only display the article, I added a filter function on the function:

if (thumbnail.includes("cdn")) {

fixItem.push(element)

}

So I only enabled articles that have a thumbnail. I’m still looking for a workaround for this because if the article doesn’t have any thumbnail, it will be skipped. At least for now, if your article has a thumbnail, it will be displayed when we import it to your GitHub readme.

It may take time to be able to get your recent article to be listed (for a new article) since the API RSS to JSON is cached. Please wait around 1-3 hours after the article has been published on Medium.
['Iman Tumorang']
['Medium', 'Open Source', 'Github', 'Software Development', 'Programming']