From 58dd9de4baae6f52661f1bae66e85ca199e2f89a Mon Sep 17 00:00:00 2001
From: Romein van Buren
Date: Fri, 23 Jun 2023 18:42:03 +0200
Subject: [PATCH] Fixed star count on website
---
website/data/github.js | 2 +-
website/includes/githubstars.liquid | 5 +----
website/layouts/page.liquid | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/website/data/github.js b/website/data/github.js
index bb9cf5a..04c78d3 100644
--- a/website/data/github.js
+++ b/website/data/github.js
@@ -2,7 +2,7 @@ const { default: fetch } = require("node-fetch")
module.exports = async function() {
try {
- const res = await fetch('https://api.github.com/repos/garraflavatra/alphabets');
+ const res = await fetch('https://api.github.com/repos/garraflavatra/rolens');
const json = await res.json();
return { stars: json.stargazers_count || 0 };
}
diff --git a/website/includes/githubstars.liquid b/website/includes/githubstars.liquid
index 64432b7..9ff6f8e 100644
--- a/website/includes/githubstars.liquid
+++ b/website/includes/githubstars.liquid
@@ -3,9 +3,6 @@
- {% if github.stars %}
- {{ github.stars }}
- {% endif %}
-
+ {{ stars }}
Star on GitHub!
diff --git a/website/layouts/page.liquid b/website/layouts/page.liquid
index 8814684..97851c3 100644
--- a/website/layouts/page.liquid
+++ b/website/layouts/page.liquid
@@ -56,7 +56,7 @@ navigationOptions:
on GitHub.
- {% render "githubstars" %}
+ {% render "githubstars", stars: github.stars %}
{% # render "mastodon" %}