feat: improve build profile DevEx — a la carte collection picker, copy buttons, contributing guide link
Summary
This PR improves the developer experience around site build profiles, make targets, and the lite-mode placeholder page that contributors see when visiting a disabled route.
Make targets
make site-content— new target for thecontentprofile (blog/news/events/resources included; members/integrations skipped). Previously the content profile existed in code but had no make target — it was only discoverable via an echo hint inmake site.make site-custom— new target for fully à la carte builds. Uses a newnonebase profile (zero preset exclusions) soBUILD_COLLECTIONS_EXCLUDEis the only thing that controls what is skipped. Example:BUILD_COLLECTIONS_EXCLUDE=members,events make site-custommake profiles— new target that lists all profiles, their excluded collections, and theBUILD_COLLECTIONS_EXCLUDEescape hatch.make cache-clean— new target that clears the Gatsby cache without triggering a full production rebuild. The existingmake cleandoes both, which surprised contributors who just wanted to reset cache.make site-analyze— fixed missing##help comment and.PHONYentry (was invisible tomakehelp output).site-fast— description updated from the useless "Alternate method" to a precise description of what it actually skips.
npm scripts
develop:content— mirrorsdevelop:litewithLITE_BUILD_PROFILE=content.develop:custom— usesLITE_BUILD_PROFILE=nonefor the à la carte target.start:content— alias consistent with the existingstart/start:fullpattern.
build-collections.js
- Added
noneprofile — excludes nothing by default, makingBUILD_COLLECTIONS_EXCLUDEthe sole driver of exclusions formake site-custom.
Lite-mode placeholder page
The placeholder shown when a contributor visits a disabled route (e.g. /blog in core mode) now has three improvements:
- Copy-to-clipboard buttons on every suggested
makecommand. - A la carte collection picker — six checkboxes that dynamically generate the correct make command as you toggle them. The current route's collection is pre-checked.
- Link to the contributing guide (
CONTRIBUTING.md#environment-variables) for full profile documentation.
Lint-staged fix
Added --no-warn-ignored to the ESLint call in .lintstagedrc.js. src/utils/ is in ESLint's ignore list, but lint-staged passes files explicitly, causing a warning that tripped --max-warnings=0 on every commit touching a src/utils/ file.
Test plan
- [ ]
make(no args) — help output listssite-content,site-custom,profiles,cache-clean,site-analyze - [ ]
make profiles— prints all four profiles with accurate exclusion lists - [ ]
make site— echo banner mentionssite-contentandsite-full - [ ]
make site-content— dev server starts with blog/news/events/resources enabled - [ ]
make cache-clean— clears.cachewithout starting a build - [ ]
BUILD_COLLECTIONS_EXCLUDE=members,events make site-custom— only listed collections excluded - [ ] Visit
/blogin core mode — placeholder showsmake site-contentfirst with Copy button;blogpre-checked in picker - [ ] Visit
/community/members— placeholder shows onlymake site-full - [ ] Toggle checkboxes — command updates live; all checked →
make site-full; none checked →make site - [ ] Contributing guide link opens
CONTRIBUTING.md#environment-variables
/gemini review
@yi-nuo426 I tried to build the site using make site, which runs develop:lite, but it doesn’t seem to work as expected. It consumes all my resources, and even after stopping the process, Gatsby keeps running in the background, crashing my laptop.
@yi-nuo426 I tried to build the site using make site, which runs develop:lite, but it doesn’t seem to work as expected. It consumes all my resources, and even after stopping the process, Gatsby keeps running in the background, crashing my laptop.
![]()
yes same
@yi-nuo426 I tried to build the site using make site, which runs develop:lite, but it doesn’t seem to work as expected. It consumes all my resources, and even after stopping the process, Gatsby keeps running in the background, crashing my laptop.
@saurabhraghuvanshii is this different than your current experience?
@Siddhi-sahu, @saurabhraghuvanshii, when you run LITE_BUILD_PROFILE=content make site, do you have a similar experience?
@Siddhi-sahu, @saurabhraghuvanshii, when you run
LITE_BUILD_PROFILE=content make site, do you have a similar experience?
yes, same, at least for me.
@yi-nuo426 I tried to build the site using make site, which runs develop:lite, but it doesn’t seem to work as expected. It consumes all my resources, and even after stopping the process, Gatsby keeps running in the background, crashing my laptop.
@saurabhraghuvanshii is this different than your current experience?
Yes. but I noticed same behaviour on master branch so issue is something else.
Already approved — just want to add a note for the community here.
This is a genuinely thoughtful developer experience improvement, @yi-nuo426. The à la carte collection picker, copy-to-clipboard buttons on every make command, and the contributing guide link in the placeholder page all address real friction points that come up repeatedly in community onboarding. The make profiles target and make cache-clean are small additions that will save contributors from a lot of unnecessary full rebuilds.
Regarding the memory issue raised by @saurabhraghuvanshii and @Siddhi-sahu: confirmed that the behavior they're seeing exists on master as well — so it's not a regression introduced by this PR. That's a separate tracking item.
The --no-warn-ignored fix to .lintstagedrc.js is a nice catch that will save contributors from confusing lint failures on src/utils/ files.
Great contribution.