- Add tab bar for GitHub Lists (All, per-list tabs, Uncategorized) - Add sort controls (stars, recently starred, recently updated, name) - Add filter controls (language, star count range, archived toggle) - Add language color dots, formatted star/fork counts, topic overflow - Fix starred count on GitHub activity page (fetch totalCount from API) - All rendering remains client-side via Alpine.js (no build OOM risk) Confab-Link: http://localhost:8080/sessions/b130e9e5-4723-435d-8d5a-fc38113381c9
33 lines
941 B
JavaScript
33 lines
941 B
JavaScript
/**
|
|
* GitHub Starred Repos Metadata
|
|
* Fetches the starred API response (cached 15min) to extract totalCount.
|
|
* Only totalCount is passed to Eleventy's data cascade — the full star
|
|
* list is discarded after parsing, keeping build memory low.
|
|
* The starred page fetches all data client-side via Alpine.js.
|
|
*/
|
|
|
|
import EleventyFetch from "@11ty/eleventy-fetch";
|
|
|
|
const INDIEKIT_URL = process.env.SITE_URL || "https://example.com";
|
|
|
|
export default async function () {
|
|
try {
|
|
const url = `${INDIEKIT_URL}/githubapi/api/starred/all`;
|
|
const response = await EleventyFetch(url, {
|
|
duration: "15m",
|
|
type: "json",
|
|
});
|
|
|
|
return {
|
|
totalCount: response.totalCount || 0,
|
|
buildDate: new Date().toISOString(),
|
|
};
|
|
} catch (error) {
|
|
console.log(`[githubStarred] Could not fetch starred count: ${error.message}`);
|
|
return {
|
|
totalCount: 0,
|
|
buildDate: new Date().toISOString(),
|
|
};
|
|
}
|
|
}
|