Intro
I had introduce my side project — so-stats last time. If you are not using it, just give it a try🚀
In this article, I want to introduce another side project that also prettify your github profile — medium-story
This project uses rss to receive your recent Medium stories, and return a svg image for you to put on readme file.
Demo first
Usage
Same as so-stats, just two steps. Simple!
- Find out your Medium username
2. Change the ?username=
value to yours.
The request url may looks like https://medium-story.vercel.app/api?username=@s09001
Paste on browser, and you’ll see the image like ⇓
Show on github profile or anywhere
Use the following markdown syntax to show your so stats card on profile.
[![My Medium story](https://medium-story.vercel.app/api?username=@s09001)](https://github.com/kurt-liao/medium-story)
Also, you can use html style.
<a href="https://github.com/kurt-liao/medium-story">
<img
height="200"
src="https://medium-story.vercel.app/api?username=@s09001"
/>
</a>
Optional Settings
There are few optional features, let’s see!
Index of articles
As I had mentioned this project uses rss to retrieve your newest 10 medium stories, so you can pass an index
parameter to get specify story that you want to show, see the sample below ⇓
index is range from 0 to 9, 0 means the latest story, and so on.
Default is 0 if you don’t pass it.
Hide specific info
You can pass a &hide=
parameter with comma-seperated values.
&hide=img,date,desc,category
![My latest medium story](https://medium-story.vercel.app/api?username=@s09001&hide=img,date)
Get story link
You can pass a &is_link=true
. Instead of return a svg image, the request will return the link of story
Use this feature on <a> tag or the link syntax in markdown to make your image clickable, sample ⇓
<a href="https://medium-story.vercel.app/api?username=@s09001&is_link=true">
<img
height="200"
src="https://medium-story.vercel.app/api?username=@s09001"
/>
</a>
or
[![My Medium story](https://medium-story.vercel.app/api?username=@s09001)](https://medium-story.vercel.app/api?username=@s09001&is_link=true)