Skip to content

Build a static site as plain files with no serverless function - #804

Merged
ajolipa merged 1 commit into
developfrom
jf/static-no-adapter
Oct 9, 2026
Merged

ajolipa merged 1 commit into
developfrom
jf/static-no-adapter

Conversation

@jamiefolsom

@jamiefolsom jamiefolsom commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

An Astro adapter is the piece that aims a build at a particular host and produces its serverless function. With STATIC_BUILD=true the 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 getStaticPaths as 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 develop as 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.

@jamiefolsom jamiefolsom added the static-mvp Static build: in the MVP (one site published as plain files from develop) label Sep 18, 2026
@jamiefolsom
jamiefolsom requested a review from ajolipa September 18, 2026 00:42
@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for pss-scavenger-hunt failed. Why did it fail? →

Name Link
🔨 Latest commit d662835
🔍 Latest deploy log https://app.netlify.com/projects/pss-scavenger-hunt/deploys/6ac96ead91ff960008a119b7

@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for marronage-staging ready!

Name Link
🔨 Latest commit d662835
🔍 Latest deploy log https://app.netlify.com/projects/marronage-staging/deploys/6ac96eadaef43d0008b3d5da
😎 Deploy Preview https://deploy-preview-804--marronage-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit d662835
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/6ac96ead77415900082549d7
😎 Deploy Preview https://deploy-preview-804--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for relnet-staging ready!

Name Link
🔨 Latest commit d662835
🔍 Latest deploy log https://app.netlify.com/projects/relnet-staging/deploys/6ac96ead1787e00008a466f2
😎 Deploy Preview https://deploy-preview-804--relnet-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jamiefolsom
jamiefolsom added this pull request to stack #806 September 18, 2026 00:42
@jamiefolsom jamiefolsom changed the title Build static sites with no adapter Build a static site as plain files with no serverless function Sep 18, 2026
@ajolipa
ajolipa force-pushed the jf/static-no-adapter branch from 1b17a40 to a0edb00 Compare October 3, 2026 06:26
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
ajolipa force-pushed the jf/static-no-adapter branch from a0edb00 to d662835 Compare October 9, 2026 22:46
@ajolipa
ajolipa merged commit dc653d0 into develop Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

static-mvp Static build: in the MVP (one site published as plain files from develop)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants