Repository navigation
Build a static site as plain files with no serverless function - #804
Merged
Merged
Conversation
❌ Deploy Preview for pss-scavenger-hunt failed. Why did it fail? →
|
✅ Deploy Preview for marronage-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for padp-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for relnet-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ajolipa
approved these changes
Oct 3, 2026
ajolipa
force-pushed
the
jf/static-no-adapter
branch
from
October 3, 2026 06:26
1b17a40 to
a0edb00
Compare
With STATIC_BUILD set, the Astro config attaches no adapter, so a static build emits plain files and no serverless function. The three preview routes, which only make sense with a server, are prerendered with no paths in static mode by a small integration. Nothing changes when STATIC_BUILD is unset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbHx5mB9KZKURcTMDh8B9e
ajolipa
force-pushed
the
jf/static-no-adapter
branch
from
October 9, 2026 22:46
a0edb00 to
d662835
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An Astro adapter is the piece that aims a build at a particular host and produces its serverless function. With
STATIC_BUILD=truethe Astro config attaches no adapter, so a static build emits plain files that any host can serve, and emits no serverless function. Nothing changes when the flag is unset.Three routes only make sense with a server: the pages, posts and paths preview routes, and the TinaCMS island endpoint. In static mode a small integration builds them with no paths, so they add nothing to the output and the build needs no adapter. It marks each route to be built ahead of time in Astro's route-setup hook, and gives it an empty
getStaticPathsas the file loads.This layer alone is not enough for a static build to finish. The build then stops on the server islands, the parts of a page a server normally renders after the page loads. #805 handles those, and together the two build marronage from
developas 167 static pages, with no serverless function and no server-island requests.Part of #710. This is the first of three pull requests that bring the static-build experiment into develop, with #805 and #807 built on top of it.