Skip to main content

GitHub: How to Create a README with Statistics for your Profile

· 3 min read
Joie Llantero

In late 2020, GitHub released a new feature which allows users to create a README file for their profiles. This file is quite useful especially in marketing yourself. You can put an introduction about yourself, your work, skills, experiences, and more. Some people also put their GitHub statistics, which I will show you how to do in this article.

The statistics that will be shown will be an overview of your GitHub account. It shall display information such as total stars, forks, repository views, languages you used, and more.

sample-readmeA sample README.md for a GitHub user’s profile

Creating your GitHub Profile’s README.md

  1. Go to this link to create a new GitHub repository.

  2. Use your username as the name of this repository like what I did in the image below.

    new-repositoryCreate a new respository.

    Take note that GitHub is warning me because I have already created my own repository for the README file. In your case, there should be a green checkmark in the right side of the text box.

  3. Initialize your new repository with a README file.

    add-readmeCheck the "Add a README file" option.
  4. GitHub auto-generates the content of this README into something similar shown below.

    ### Hi there 👋

    <!--
    **joiellantero/joiellantero** is a ✨ _special_ ✨ repository because its `README.md` (this file) appears on your GitHub profile.
    Here are some ideas to get you started:
    - 🔭 I’m currently working on ...
    - 🌱 I’m currently learning ...
    - 👯 I’m looking to collaborate on ...
    - 🤔 I’m looking for help with ...
    - 💬 Ask me about ...
    - 📫 How to reach me: ...
    - 😄 Pronouns: ...
    - ⚡ Fun fact: ...
    -->

    If you’re not familiar with markdown, here are some resources for you to check out:

  5. Edit this to your liking, and don’t forget to commit (and push if you’re not using GitHub’s web interface) your changes!

Generating your own statistics

  1. Visit this link and follow the installation instructions written on README.md.

  2. After the workflow is done, go to the “generated” folder. You will see two files like the ones below.

    generated-folder
    Go to the "generated" folder
  3. Click on them and copy the URL leading to the image. Remember not to use “raw”. This is because we want the link to the image and not the SVG code itself.

    languages.svg
    Copy URL of the languages.svg
  4. Go to the repository you created earlier and open up the README.md file as we will now display the SVGs using the link that you copied.

    ![](<the link you copied for overview.svg here>)
    ![](<the link you copied for languages.svg here>)

    In my case, it would look something like this:

    ![](https://github.com/joiellantero/github-stats/blob/master/generated/overview.svg)
    ![](https://github.com/joiellantero/github-stats/blob/master/generated/languages.svg)
  5. Commit (and push if you’re not using GitHub’s web interface) your changes and checkout your new GitHub profile!

  6. Share this with others if you liked this tutorial.