How To Show Latest Hashnode Blog Posts In Github Profile Readme?

How To Show Latest Hashnode Blog Posts In Github Profile Readme?


2 min read

Hi There,

I recently decided to start my own blog using Hashnode. after setting up the blog I found out that there is no GitHub action which can update my Github Profile Readme with the latest posts I write here.

So I decided to jump into work and started to create a GitHub action that can do the job.

๐ŸŽ‰ Github Action For Hashnode Blogs ๐ŸŽ‰

Using this action you will be able to display the latest posts from your account to your Github Profile Readme or Update it in a Github Gist which can be pinned to your profile later & it can render the latest posts data in multiple styles.

Setting up with Github Profile Readme

I assume that you already have created your Github Profile Readme

Step 1 :

Add the below content to your file in Github Profile

## My Latest Blog Posts ๐Ÿ‘‡

Step 2 :

Create blog.yml file inside of .github/workflows/ folder in your Github Profile Readme repository

name: "๐Ÿ“š Blog Updater"

    - cron: '0 0 * * *' # Runs Every Day

    name: "Update Blogs"
    runs-on: ubuntu-latest
      - name: "๐Ÿ“ฅ  Fetching Repository Contents"
        uses: actions/checkout@main

      - name: "๐Ÿ“š  Hashnode Updater"
        uses: "varunsridharan/action-hashnode-blog@main"
          USERNAME: 'your-username'
          COUNT: 10
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

That's it now we have configured the workflow & file. and the workflow is set to run once every day or when manually triggered.

now navigate to the Actions tab in that repository, select the workflow that we added and click RUN

How To Run Github Workflow Manually


This action can be used with Gist or with any other repository For more information on this action please check the GitHub repository