mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
5,137 starred repos in Nunjucks template + Pagefind indexing exceeded the 2048MB Eleventy heap limit during build. Switched to Alpine.js client-side rendering: - _data/githubStarred.js: returns only buildDate (no API fetch) - starred.njk: fetches /githubapi/api/starred/all via Alpine.js - Added client-side text search (replaces separate Pagefind index) - Removed pagefind-starred build step and --exclude-selectors flag Confab-Link: http://localhost:8080/sessions/b130e9e5-4723-435d-8d5a-fc38113381c9
13 lines
340 B
JavaScript
13 lines
340 B
JavaScript
/**
|
|
* GitHub Starred Repos Metadata
|
|
* Provides build timestamp only — the starred page fetches all data
|
|
* client-side via Alpine.js to avoid loading 5000+ objects into
|
|
* Eleventy's memory during build (causes OOM on constrained containers).
|
|
*/
|
|
|
|
export default function () {
|
|
return {
|
|
buildDate: new Date().toISOString(),
|
|
};
|
|
}
|