Show your latest Hashnode blog posts automatically on your GitHub profile readme

Show your latest Hashnode blog posts automatically on your GitHub profile readme

I created a GitHub Action that lets you add links to your latest blog posts from hashnde and other sources to your Github Profile readme automatically.

Check it out if you want a readme like this: image.png

Check out the project on GitHub: github.com/gautamkrishnar/blog-post-workflow

Getting started

  • Create a new repository with the same name as your GitHub username
  • Go to your repository
  • Add the following section to your README.md file, you can give whatever title you want. Just make sure that you use <!-- BLOG-POST-LIST:START --><!-- BLOG-POST-LIST:END --> in your readme. The workflow will replace this comment with the actual blog post list:
# Blog posts
<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->
  • Create a folder named .github and create a workflows folder inside it if it doesn't exist
  • Create a new file named hashnde-post-workflow.yml with the following contents inside the workflows folder:
name: Latest hashnde blog post workflow
on:
  schedule: # Run workflow automatically
    - cron: '0 * * * *' # Runs every hour, on the hour
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
jobs:
  update-readme-with-hashnde-blog:
    name: Update this repo's README with the latest hashnde blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@master
        with:
          feed_list: "https://username.hashnode.dev/rss.xml"

Make sure that you replace the username with your hashnde username.

  • Commit and wait for it to run automatically or you can also trigger it manually to see the result instantly. To trigger the workflow manually, please follow the steps in the video.

This workflow also supports showing posts from other platforms as well, all you need is an RSS feed url. You can even show your latest StackOverflow activity. Please check the project readme for more details and options.

Really excited to see the awesome readmes you are creating with this.

Don't forget to give it a star if you liked the project: github.com/gautamkrishnar/blog-post-workflow