Skip to content

Add need for adapter to server islands guide#10418

Merged
yanthomasdev merged 5 commits into
mainfrom
sarah11918-patch-1
Dec 17, 2024
Merged

Add need for adapter to server islands guide#10418
yanthomasdev merged 5 commits into
mainfrom
sarah11918-patch-1

Conversation

@sarah11918
Copy link
Copy Markdown
Member

@sarah11918 sarah11918 commented Dec 17, 2024

Description (required)

This PR adds explicit mention that server islands require an adapter installed (in three places).

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 17, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit d11a082
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6761e7582a667d0008d06b10
😎 Deploy Preview https://deploy-preview-10418--astro-docs-2.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 site configuration.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Dec 17, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/on-demand-rendering.mdx Source changed, localizations will be marked as outdated.
en/guides/server-islands.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small detail, but should be good to go after you address it

To render any page on demand, you need to add an **adapter**. Each adapter allows Astro to output a script that runs your project on a specific **runtime**: the environment that runs code on the server to generate pages when they are requested (e.g. Netlify, Cloudflare).

You may also wish to add an adapter even if your site is entirely static and you are not rendering any pages on demand. For example, the [Netlify adapter](/en/guides/integrations-guide/netlify/) enables Netlify's Image CDN, and the [Vercel adapter](/en/guides/integrations-guide/vercel/) enables services such as web analytics.
You may also wish to add an adapter even if your site is entirely static and you are not rendering any pages on demand. For example, the [Netlify adapter](/en/guides/integrations-guide/netlify/) enables Netlify's Image CDN, and [server islands](/en/guides/server-islands/) require an adapter to use `server:defer` on a component.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not so sure about the wording, at first I got confused because it sounded like the adapter is what needs to use server:defer on a component, not that you need an adapter to use server islands. Or it might just be a brain fart on my side, it happens.

Maybe something like this is more clear?

Suggested change
You may also wish to add an adapter even if your site is entirely static and you are not rendering any pages on demand. For example, the [Netlify adapter](/en/guides/integrations-guide/netlify/) enables Netlify's Image CDN, and [server islands](/en/guides/server-islands/) require an adapter to use `server:defer` on a component.
You may also wish to add an adapter even if your site is entirely static and you are not rendering any pages on demand. For example, the [Netlify adapter](/en/guides/integrations-guide/netlify/) enables Netlify's Image CDN, and to use [server islands](/en/guides/server-islands/) you also require an adapter to allow you to use `server:defer` on components.

Copy link
Copy Markdown
Member Author

@sarah11918 sarah11918 Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, yours seems more convoluted to me, so we might need an impartial judge here! 💜

Would something like this, keeping the original structure, be clearer?

"server islands require an adapter installed to use server:defer on a component"

"server islands require an adapter installed to add server:defer to a component"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that works for me!

Comment thread src/content/docs/en/guides/on-demand-rendering.mdx Outdated
@sarah11918 sarah11918 added improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! labels Dec 17, 2024
@yanthomasdev yanthomasdev merged commit 466262e into main Dec 17, 2024
@yanthomasdev yanthomasdev deleted the sarah11918-patch-1 branch December 17, 2024 21:13
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Dec 20, 2024
thomasbnt added a commit that referenced this pull request Dec 21, 2024
* i18n(fr): create `guides/on-demand-rendering.mdx`

See #9240 and #10418

* fix links

* typo

Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com>

---------

Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants