From 031a9b38ff6180e574e49097a5a1d0224d3c43ea Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Sat, 18 Mar 2023 19:01:30 -0300 Subject: [PATCH] =?UTF-8?q?Added=20github=20=F0=9F=8F=86=20section=20in=20?= =?UTF-8?q?repositories=20(#1229)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creates a new section with user trophies. --- README.md | 15 ++++++++++++++- _config.yml | 4 ++++ _includes/repository/repo_trophies.html | 6 ++++++ _pages/repositories.md | 16 +++++++++++++++- 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 _includes/repository/repo_trophies.html diff --git a/README.md b/README.md index e4b7a42879c5..46d92678dca1 100644 --- a/README.md +++ b/README.md @@ -515,7 +515,8 @@ Easily create beautiful grids within your blog posts and project pages: ### Other features #### GitHub repositories and user stats -**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) to display GitHub repositories and user stats on the the `/repositories/` page. +**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) and [github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy) +to display GitHub repositories and user stats on the the `/repositories/` page. Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories to the the `/repositories/` page. @@ -530,6 +531,18 @@ You may also use the following codes for displaying this in any other pages. {% endif %} + +{% if site.repo_trophies.enabled %} +{% for user in site.data.repositories.github_users %} + {% if site.data.repositories.github_users.size > 1 %} +

{{ user }}

+ {% endif %} +
+ {% include repository/repo_trophies.html username=user %} +
+{% endfor %} +{% endif %} + {% if site.data.repositories.github_repos %}
diff --git a/_config.yml b/_config.yml index 63ae0d1a263c..b5315ea08c74 100644 --- a/_config.yml +++ b/_config.yml @@ -34,6 +34,10 @@ highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-them # repo color theme repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md +repo_trophies: + enabled: true + theme_light: flat # https://github.com/ryo-ma/github-profile-trophy + theme_dark: gitdimmed # https://github.com/ryo-ma/github-profile-trophy # ----------------------------------------------------------------------------- # RSS Feed diff --git a/_includes/repository/repo_trophies.html b/_includes/repository/repo_trophies.html new file mode 100644 index 000000000000..18f5273acbd1 --- /dev/null +++ b/_includes/repository/repo_trophies.html @@ -0,0 +1,6 @@ +
+ + {{ include.username }} + {{ include.username }} + +
diff --git a/_pages/repositories.md b/_pages/repositories.md index 57ef2205b699..ee29f385f1a7 100644 --- a/_pages/repositories.md +++ b/_pages/repositories.md @@ -15,10 +15,24 @@ nav_order: 3 {% include repository/repo_user.html username=user %} {% endfor %}
-{% endif %} --- +{% if site.repo_trophies.enabled %} +{% for user in site.data.repositories.github_users %} + {% if site.data.repositories.github_users.size > 1 %} +

{{ user }}

+ {% endif %} +
+ {% include repository/repo_trophies.html username=user %} +
+ + --- + +{% endfor %} +{% endif %} +{% endif %} + ## GitHub Repositories {% if site.data.repositories.github_repos %}