From aded4a9a02f48cb8fac74a712c37f8d5ff2a4e1f Mon Sep 17 00:00:00 2001 From: ZimboPro Date: Thu, 9 Jan 2025 11:06:41 +0200 Subject: [PATCH 1/3] feat: add Github stars and last commit --- templates/categories/macros.html | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/templates/categories/macros.html b/templates/categories/macros.html index a6e65482..1bda55a4 100644 --- a/templates/categories/macros.html +++ b/templates/categories/macros.html @@ -20,6 +20,8 @@ {% set data = load_data(url="https://api.github.com/repos/" ~ item.name, format="json") %} {% set name = data.name %} {% set repository_url = data.html_url %} + {# Org or User name #} + {% set owner = data.owner.login %} {% if data.homepage != "" %} {% set homepage_url = data.homepage %} {% endif %} @@ -103,9 +105,8 @@ - {% if item.source and item.source == 'crates' or gitter_url %} + {% if item.source or gitter_url %}
- {# only projects hosted on crates get badges for now #}
{% if item.source and item.source == 'crates' %} @@ -138,6 +139,22 @@
{% endif %} + {% if item.source and item.source == 'github' %} + + + {% endif %} {% if gitter_url %}
From 3e9c594f93d34df9b723700e9f5f74b9d81cbc91 Mon Sep 17 00:00:00 2001 From: ZimboPro Date: Thu, 9 Jan 2025 11:11:58 +0200 Subject: [PATCH 2/3] fix: fix alt name --- templates/categories/macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/categories/macros.html b/templates/categories/macros.html index 1bda55a4..94c7d97d 100644 --- a/templates/categories/macros.html +++ b/templates/categories/macros.html @@ -143,7 +143,7 @@ From a252192359b77f1380498db64139b6d9ba589928 Mon Sep 17 00:00:00 2001 From: ZimboPro Date: Thu, 9 Jan 2025 11:20:19 +0200 Subject: [PATCH 3/3] ci: create artifact for generated site --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d95d6ee..d80c8dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,10 @@ jobs: run: curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz - run: ./zola --version - run: ./zola build + - uses: actions/upload-artifact@v4 + with: + path: public + retention-days: 10 - name: Deploy if: github.ref == 'refs/heads/master' uses: crazy-max/ghaction-github-pages@v3