# How to automate your GitHub profile README

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1640441505157/3XI-Ws5QF.png align="center")

## Update: RSS support

Add this to your template `README.md.tpl`, and `readme-scribe` will parse an RSS feed and render them in your final `README.md`

```markdown
#### 📖 My latest blog posts
{{- range rss "https://blog.ediri.io/rss.xml" 6 }}
- [{{ .Title }}]({{ .URL }}) ({{ humanize .PublishedAt }})
{{- end }}
```

##   
Introduction

By now, most people on GitHub already know about the possibility of creating a [GitHub profile README](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme).

If not, click on the link to follow the steps in the official GitHub docs. Or check out some great videos on YouTube about setting up a basic profile page:

Here some good videos to start with:

<iframe width="560" height="315" src="https://www.youtube.com/embed/JUSpq9rKDBQ"></iframe>

or

<iframe width="560" height="315" src="https://www.youtube.com/embed/ECuqb5Tv9qI"></iframe>

But let us see, how we can make some parts of our profile dynamic and automate this with the help of GitHub actions.

## GitHub Actions

The profile repo is the same as your normal code repositories. That means we can create GitHub actions and store them in the `.github` folder.

That said, let us see some of these GitHub actions in more detail.

### GitHub Readme Stats

I absolutely love this project, the sheer amount of cards with different stats and the possibility to customize them is mind-blowing. Implementing them is even, easier. No templating stuff going on, just add them via Markdown syntax

```markdown
![Engin`s GitHub stats](https://github-readme-stats.vercel.app/api?username=dirien&show_icons=true&theme=radical)
```

And that's how my Card looks like, with the `radical` theme enabled:

![Engin`s GitHub stats](https://github-readme-stats.vercel.app/api?username=dirien&show_icons=true&theme=radical align="left")

On top, you can host the backend, on your server. This is in case the service hits the 5k API rate limit from GitHub.

%[https://github.com/anuraghazra/github-readme-stats] 

### Credly Badge

With these cool GitHub actions, you can retrieve your Credly badges and display them in your `README`.

Simply create a GitHub workflow:

```yaml
name: Update badges

on:
  schedule:
    # Runs at 0am UTC every day
    - cron: "0 0 * * *"
jobs:
  update-readme:
    name: Update Readme with badges
    runs-on: ubuntu-latest
    steps:
      - name: Badges - Readme
        uses: pemtajo/badge-readme@main
        with:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          COMMIT_MESSAGE: "My commit message to update badges"
          CREDLY_USER: <username_credly>
          CREDLY_SORT: POPULAR
```

And add these markers to your README

```markdown
<!--START_SECTION:badges-->
<!--END_SECTION:badges-->
```

Voilà, you get the sweet badges, fetched and inserted. This is what my badges look like.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1640434519135/gA-0qOI2T.png align="left")

%[https://github.com/pemtajo/badge-readme#other-repository-not-profile] 

### readme-scribe

`readme-scribe` is the next GitHub action, I love. It uses the powerful [markscribe](https://github.com/muesli/markscribe) template engine.

%[https://github.com/muesli/markscribe] 

All you need to do is create a `README.md.tpl` file and start to use the predefined functions.

```markdown
#### 👷 Check out what I'm currently working on
{{range recentContributions 10}}
- [{{.Repo.Name}}]({{.Repo.URL}}) - {{.Repo.Description}} ({{humanize .OccurredAt}})
{{- end}}

#### 🌱 My latest projects
{{range recentRepos 10}}
- [{{.Name}}]({{.URL}}) - {{.Description}}
{{- end}}
```

You can update then the `README` page with some GitHub workflow.

```yaml
name: Update README

on:
  push:
  schedule:
    - cron: "0 */1 * * *"

jobs:
  markscribe:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master

      - uses: muesli/readme-scribe@master
        env:
          GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
        with:
          template: "templates/README.md.tpl"
          writeTo: "README.md"

      - uses: stefanzweifel/git-auto-commit-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          commit_message: Update generated README
          branch: main
          commit_user_name: readme-scribe 🤖
          commit_user_email: actions@github.com
          commit_author: readme-scribe 🤖 <actions@github.com>
```

My `README` file looks like this:

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1640435051407/DNvHgm2cN.png align="left")

\-&gt; https://github.com/muesli/readme-scribe

## Summary

That's it. You should have now some good idea of what is possible with the personal profile `README` file. You can now fully be creative and tell every visitor more about yourself.

This is how my profile `README` looks like this:

%[https://github.com/dirien]
