diff --git a/_data/githubActivity.js b/_data/githubActivity.js index 48a5f95..7d87878 100644 --- a/_data/githubActivity.js +++ b/_data/githubActivity.js @@ -27,7 +27,7 @@ async function fetchGiteaCommits() { try { const url = `${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${repo}/commits?limit=15`; console.log(`[giteaActivity] Fetching commits: ${url}`); - const commits = await EleventyFetch(url, { duration: "15m", type: "json" }); + const commits = await cachedFetch(url, { duration: "15m", type: "json" }); for (const c of Array.isArray(commits) ? commits : []) { const msg = (c.commit?.message || "").split("\n")[0]; @@ -52,7 +52,7 @@ async function fetchGiteaCommits() { async function fetchGiteaFeatured() { try { const url = `${GITEA_URL}/api/v1/orgs/${GITEA_ORG}/repos?limit=10&sort=newest`; - const repos = await EleventyFetch(url, { duration: "15m", type: "json" }); + const repos = await cachedFetch(url, { duration: "15m", type: "json" }); return (Array.isArray(repos) ? repos : []) .filter((r) => !r.fork && !r.private) diff --git a/_data/githubStarred.js b/_data/githubStarred.js index ae45b49..16016f2 100644 --- a/_data/githubStarred.js +++ b/_data/githubStarred.js @@ -8,7 +8,7 @@ import { cachedFetch } from "../lib/data-fetch.js"; -const INDIEKIT_URL = process.env.SITE_URL || "https://example.com"; +const INDIEKIT_URL = process.env.INDIEKIT_URL || process.env.SITE_URL || "https://example.com"; export default async function () { try { diff --git a/_data/recentComments.js b/_data/recentComments.js index 0f9edda..5b3cc65 100644 --- a/_data/recentComments.js +++ b/_data/recentComments.js @@ -5,7 +5,7 @@ import { cachedFetch } from "../lib/data-fetch.js"; -const INDIEKIT_URL = process.env.SITE_URL || "https://example.com"; +const INDIEKIT_URL = process.env.INDIEKIT_URL || process.env.SITE_URL || "https://example.com"; export default async function () { try { diff --git a/_data/youtubeChannel.js b/_data/youtubeChannel.js index 81be351..97d0e94 100644 --- a/_data/youtubeChannel.js +++ b/_data/youtubeChannel.js @@ -6,7 +6,7 @@ import { cachedFetch } from "../lib/data-fetch.js"; -const INDIEKIT_URL = process.env.SITE_URL || "https://example.com"; +const INDIEKIT_URL = process.env.INDIEKIT_URL || process.env.SITE_URL || "https://example.com"; /** * Fetch from Indiekit's public YouTube API endpoint