Thin wrapper Hugo module for GitHub Readme Stats

Here is my next little module: hugo-mod-github-readme-stats You can find a demo here: Projects :: hugo-theme-gruvbox — Theme Demo

It’s a thin wrapper for the very popular GitHub Readme Stats cards.

You can already display GitHub Readme Stats cards by just using markdown. But I also wanted to use them in my template files which is why I created this module.

It was really fun to implement and turned out more elegant than I expected.

Here is an example

{{ partial "github-readme-stats/pin.html" (dict "username" "schnerring" "repo" "hugo-mod-github-readme-stats" "show_owner" "true") }}

I also added shortcodes if you prefer a more hugofied syntax in your markdown files:

{{< github-readme-stats/stats class="gh-stats-card" username="schnerring" theme="gruvbox_light" >}}

The parameter names are mapped from the original configuration options for each card type. You can find some more info in the README on GitHub.

1 Like