-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict Between SSR Deployment Guides Using Adapters (output: 'server') and the On-Demand Rendering Guide (output: 'static') #11245
Comments
Thank you for filing this issue! We still do have some legacy docs (especially deploy guides are typically quite old) that are from a time before we even had (the now deprecated!) One thought I had was that linking to the adapters guide when we want to show manual installation (vs duplicating the same instructions on a deploy guide) allows us to get this right, get it right ONCE, and then use this as our main reference. I will also point out that we also can't just make blanket changes across the board: there may also be some situations/recipes that do describe a I do think maybe starting with unifying the adapter page intros to include:
Then, from the config code samples, just remove Lastly, all the deploy guides should probably have much less about installing an adapter (at all: CLI or manual). That should just be a link to where we make our canonical docs. That's my first thought here! |
I agree, no comment here! Thank you!
I just tried adding adapters through the Astro CLI and they don’t change the Astro config |
📚 Subject area/topic
SSR, Adapters, Astro Output Configuration
📋 Page(s) affected (or suggested, for new content)
https://docs.astro.build/en/guides/on-demand-rendering
https://docs.astro.build/en/guides/integrations-guide/cloudflare/
https://docs.astro.build/en/guides/integrations-guide/netlify/
https://docs.astro.build/en/guides/integrations-guide/node/
https://docs.astro.build/en/guides/integrations-guide/vercel/
📋 Description of content that is out-of-date or incorrect
Problem:
The current deployment guides for official Astro adapters (Cloudflare, Netlify, Node, and Vercel) recommend setting
output: 'server'
by default. However, this conflicts with the tip (and Astro's main philosophy of delivering the smallest amount of JavaScript possible) in the on-demand rendering guide, which suggests starting withoutput: 'static'
unless most pages require SSR.For example, the Cloudflare manual installation guide instructs users to configure astro.config.mjs as follows:
Why this is confusing:
Astro’s docs recommend
output: 'static'
by default:output: 'static'
should remain the starting point for most projects, yet all official adapter guides default tooutput: 'server'
.Cloudflare Pages does not require
output: 'server'
:output: 'static'
is used.Granular control with
prerender = false
already exists:export const prerender = false
, makingoutput: 'server'
unnecessary for projects that are mostly static.All official adapter guides follow this pattern:
output: 'server'
, despiteoutput: 'static'
being the suggested starting point in Astro’s other documentation.Suggestion:
output: 'static'
works too – Keepoutput: 'server'
as the default in deployment guides but explicitly mention thatoutput: 'static'
is also viable with a reminder on usingprerender: false
for SSR pages.output: static
as the default when installing adapter, and then clarify that you need to addprerender: false
for SSR pages.🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: