From 1b3c285c9934073f3de8ccb139bf53c28f544639 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 18:48:41 +0000 Subject: [PATCH 01/17] update all adapter install instructions to no longer show adding server mode --- .../docs/en/guides/integrations-guide/cloudflare.mdx | 7 ++++--- src/content/docs/en/guides/integrations-guide/netlify.mdx | 7 ++++--- src/content/docs/en/guides/integrations-guide/node.mdx | 7 ++++--- src/content/docs/en/guides/integrations-guide/vercel.mdx | 8 +++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 9fef2ac4d067d..7854360fb6767 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -50,6 +50,8 @@ Add the Cloudflare adapter to enable SSR in your Astro project with the `astro a +Now, you can enable [on-demand rendering per page](/en/guides/on-demand-rendering/#enabling-on-demand-rendering), or set your build output configuration to `output: 'server'` to [server-render all your pages by default](/en/guides/on-demand-rendering/#server-mode). + ### Manual Install First, add the `@astrojs/cloudflare` adapter to your project's dependencies using your preferred package manager. @@ -72,14 +74,13 @@ First, add the `@astrojs/cloudflare` adapter to your project's dependencies usin -Then, add the adapter and your desired [on-demand rendering mode](/en/guides/on-demand-rendering/) to your `astro.config.mjs` file: +Then, add the adapter to your `astro.config.mjs` file: -```js title="astro.config.mjs" ins={2,5-6} +```js title="astro.config.mjs" ins={2,5} import { defineConfig } from 'astro/config'; import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ - output: 'server', adapter: cloudflare(), }); ``` diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index b65a7cf13e27e..d2ade50b60720 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -46,6 +46,8 @@ This will install `@astrojs/netlify` and make the appropriate changes to your `a +Now, you can enable [on-demand rendering per page](/en/guides/on-demand-rendering/#enabling-on-demand-rendering), or set your build output configuration to `output: 'server'` to [server-render all your pages by default](/en/guides/on-demand-rendering/#server-mode). + ### Manual Install First, install the Netlify adapter to your project’s dependencies using your preferred package manager: @@ -68,15 +70,14 @@ First, install the Netlify adapter to your project’s dependencies using your p -Then, add the adapter and your desired [on-demand rendering mode](/en/guides/on-demand-rendering/) to your `astro.config.*` file: +Then, add the adapter to your `astro.config.*` file: - ```js title="astro.config.mjs" ins={2, 6-7} + ```js title="astro.config.mjs" ins={2, 6} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify(), }); ``` diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index 23704ca601935..89b7479497b6e 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -44,6 +44,8 @@ This will install `@astrojs/node` and make the appropriate changes to your `astr +Now, you can enable [on-demand rendering per page](/en/guides/on-demand-rendering/#enabling-on-demand-rendering), or set your build output configuration to `output: 'server'` to [server-render all your pages by default](/en/guides/on-demand-rendering/#server-mode). + ### Manual Install First, add the Node adapter to your project’s dependencies using your preferred package manager. @@ -66,14 +68,13 @@ First, add the Node adapter to your project’s dependencies using your preferre -Then, add the adapter and your desired [on-demand rendering mode](/en/guides/on-demand-rendering/) to your `astro.config.*` file: +Then, add the adapterto your `astro.config.*` file: -```js title="astro.config.mjs" ins={2,5-8} +```js title="astro.config.mjs" ins={2,5-7} import { defineConfig } from 'astro/config'; import node from '@astrojs/node'; export default defineConfig({ - output: 'server', adapter: node({ mode: 'standalone', }), diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index f782a37852db3..b91dddaa2d884 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -47,6 +47,9 @@ Add the Vercel adapter to enable SSR in your Astro project with the following `a + +Now, you can enable [on-demand rendering per page](/en/guides/on-demand-rendering/#enabling-on-demand-rendering), or set your build output configuration to `output: 'server'` to [server-render all your pages by default](/en/guides/on-demand-rendering/#server-mode). + ### Manual Install First, add the `@astrojs/vercel` adapter to your project’s dependencies using your preferred package manager: @@ -69,15 +72,14 @@ First, add the `@astrojs/vercel` adapter to your project’s dependencies using -Then, add the adapter and your desired [on-demand rendering mode](/en/guides/on-demand-rendering/) to your `astro.config.*` file: +Then, add the adapter to your `astro.config.*` file: -```js title="astro.config.mjs" ins={2, 6-7} +```js title="astro.config.mjs" ins={2, 6} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel(), }); ``` From b53f3a2d2f6fa13bc1c59371171998c0044c18e0 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:00:27 +0000 Subject: [PATCH 02/17] update all adapter intros to better describe on demand routes and features --- .../docs/en/guides/integrations-guide/cloudflare.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/netlify.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/node.mdx | 2 +- src/content/docs/en/guides/integrations-guide/vercel.mdx | 8 ++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 7854360fb6767..c3a1ad03badba 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -15,9 +15,9 @@ import Since from '~/components/Since.astro'; import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; -This adapter allows Astro to deploy your [on-demand rendered routes](/en/guides/on-demand-rendering/) to [Cloudflare](https://www.cloudflare.com/). +This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to [Cloudflare](https://www.cloudflare.com/), including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). -If you're using Astro as a static site builder, you don't need an adapter to deploy to Cloudflare. +If you're using Astro as a static site builder, you don't need an adapter. Learn how to deploy your Astro site in our [Cloudflare deployment guide](/en/guides/deploy/cloudflare/). diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index d2ade50b60720..f261f404cf104 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -11,9 +11,9 @@ i18nReady: true import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' import Since from '~/components/Since.astro'; -This adapter allows Astro to deploy your [on-demand rendered routes](/en/guides/on-demand-rendering/) to [Netlify](https://www.netlify.com/). +This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to [Netlify](https://www.netlify.com/), including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). -If you're using Astro as a static site builder, you don't need an adapter. +If you're using Astro as a static site builder, you only need this adapter if you are using additional Netlify services that require a server (e.g. [Netlify Image CDN](#netlify-image-cdn-support)). Otherwise, you do not need an adapter to deploy your static site. Learn how to deploy your Astro site in our [Netlify deployment guide](/en/guides/deploy/netlify/). diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index 89b7479497b6e..6c042b87e7967 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -11,7 +11,7 @@ i18nReady: true import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' -This adapter allows Astro to deploy your [on-demand rendered routes](/en/guides/on-demand-rendering/) to Node targets. +This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to to Node targets, including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). If you're using Astro as a static site builder, you don't need an adapter. diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index b91dddaa2d884..c56d12b3f32b6 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -13,12 +13,16 @@ import Since from '~/components/Since.astro'; import ReadMore from '~/components/ReadMore.astro' import { Steps } from '@astrojs/starlight/components'; -This adapter allows Astro to deploy your [on-demand rendered routes](/en/guides/on-demand-rendering/) to [Vercel](https://www.vercel.com/). +This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to [Vercel](https://www.vercel.com/), including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). -If you're using Astro as a static site builder, you only need this adapter if you are using additional Vercel services (e.g. [Vercel Web Analytics](https://vercel.com/docs/analytics), [Vercel Image Optimization](https://vercel.com/docs/image-optimization)). Otherwise, you do not need an adapter to deploy your `static` site. +If you're using Astro as a static site builder, you only need this adapter if you are using additional Vercel services (e.g. [Vercel Web Analytics](https://vercel.com/docs/analytics), [Vercel Image Optimization](https://vercel.com/docs/image-optimization)). Otherwise, you do not need an adapter to deploy your static site. Learn how to deploy your Astro site in our [Vercel deployment guide](/en/guides/deploy/vercel/). + + + + ## Why Astro Vercel [Vercel](https://www.vercel.com/) is a deployment platform that allows you to host your site by connecting directly to your GitHub repository. This adapter enhances the Astro build process to prepare your project for deployment through Vercel. From f05f4253feafcbc8b6d64eea1aa4989577aaeecd Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:06:07 +0000 Subject: [PATCH 03/17] replace SSR throughout adapter docs --- .../docs/en/guides/integrations-guide/cloudflare.mdx | 12 ++++++------ .../docs/en/guides/integrations-guide/netlify.mdx | 4 ++-- .../docs/en/guides/integrations-guide/node.mdx | 4 ++-- .../docs/en/guides/integrations-guide/vercel.mdx | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index c3a1ad03badba..3e9c113389f45 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -1,7 +1,7 @@ --- type: integration title: '@astrojs/cloudflare' -description: Learn how to use the @astrojs/cloudflare SSR adapter to deploy your Astro project. +description: Learn how to use the @astrojs/cloudflare adapter to deploy your Astro project. sidebar: label: Cloudflare githubIntegrationURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/cloudflare/' @@ -30,7 +30,7 @@ Cloudflare's [Developer Platform](https://developers.cloudflare.com/) lets you d Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Cloudflare adapter to enable SSR in your Astro project with the `astro add` command. This will install `@astrojs/cloudflare` and make the appropriate changes to your `astro.config.mjs` file in one step. +Add the Cloudflare adapter to enable server-rendering in your Astro project with the `astro add` command. This will install `@astrojs/cloudflare` and make the appropriate changes to your `astro.config.mjs` file in one step. @@ -111,7 +111,7 @@ Determines which image service is used by the adapter. The adapter will default * **`cloudflare`:** Uses the [Cloudflare Image Resizing](https://developers.cloudflare.com/images/image-resizing/) service. * **`passthrough`:** Uses the existing [`noop`](/en/guides/images/#configure-no-op-passthrough-service) service. -* **`compile`:** Uses Astro's default service (sharp), but only on pre-rendered routes at build time. During SSR for pages rendered on-demand, all `astro:assets` features are disabled. +* **`compile`:** Uses Astro's default service (sharp), but only on pre-rendered routes at build time. For pages rendered on-demand, all `astro:assets` features are disabled. * **`custom`:** Always uses the image service configured in [Image Options](/en/reference/configuration-reference/#image-options). **This option will not check to see whether the configured image service works in Cloudflare's `workerd` runtime.** ```js title="astro.config.mjs" ins={6} @@ -213,14 +213,14 @@ Configure additional routes to be generated on demand by the Cloudflare adapter **Default:** `undefined`

-Configure routes to be excluded from on-demand rendering in the `routes.extend.exclude` array. These routes will be prerendered and served statically instead, and will not invoke the SSR function. Additionally you can use this option to serve any static asset (e.g. images, fonts, css, js, html, txt, json, etc.) files directly without routing the request through the SSR function. +Configure routes to be excluded from on-demand rendering in the `routes.extend.exclude` array. These routes will be prerendered and served statically instead, and will not invoke the server function. Additionally you can use this option to serve any static asset (e.g. images, fonts, css, js, html, txt, json, etc.) files directly without routing the request through the server function. ```js title="astro.config.mjs" export default defineConfig({ adapter: cloudflare({ routes: { extend: { - include: [{ pattern: '/static' }], // Route a prerended page to the SSR function for on-demand rendering + include: [{ pattern: '/static' }], // Route a prerended page to the server function for on-demand rendering exclude: [{ pattern: '/pagefind/*' }], // Use Starlight's pagefind search, which is generated statically at build time } }, @@ -368,7 +368,7 @@ This is available on Cloudflare Workers and Pages. ### Routes #### Routing on Cloudflare Workers -Routing for static assets is based on the file structure in the build directory (e.g. `./dist`). If no match is found, this will fall back to the Worker for SSR. Read more about [static asset routing with Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/routing/). +Routing for static assets is based on the file structure in the build directory (e.g. `./dist`). If no match is found, this will fall back to the Worker for on demand rendering. Read more about [static asset routing with Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/routing/). Unlike [Cloudflare Pages](#routing-on-cloudflare-pages), with Workers, you do not need a `_routes.json` file. diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index f261f404cf104..946afde69063d 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -1,7 +1,7 @@ --- type: integration title: '@astrojs/netlify' -description: Learn how to use the @astrojs/netlify SSR adapter to deploy your Astro project. +description: Learn how to use the @astrojs/netlify adapter to deploy your Astro project. sidebar: label: Netlify githubIntegrationURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/netlify/' @@ -25,7 +25,7 @@ Learn how to deploy your Astro site in our [Netlify deployment guide](/en/guides Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Netlify adapter to enable SSR in your Astro project with the `astro add` command. +Add the Netlify adapter to enable on demand rendering in your Astro project with the `astro add` command. This will install `@astrojs/netlify` and make the appropriate changes to your `astro.config.mjs` file in one step. diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index 6c042b87e7967..8837454fdfb08 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -1,7 +1,7 @@ --- type: integration title: '@astrojs/node' -description: Learn how to use the @astrojs/node SSR adapter to deploy your Astro project. +description: Learn how to use the @astrojs/node adapter to deploy your Astro project. sidebar: label: Node githubIntegrationURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/node/' @@ -23,7 +23,7 @@ If you're using Astro as a static site builder, you don't need an adapter. Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Node adapter to enable SSR in your Astro project with the `astro add` command. +Add the Node adapter to enable on demand rendering in your Astro project with the `astro add` command. This will install `@astrojs/node` and make the appropriate changes to your `astro.config.*` file in one step. diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index c56d12b3f32b6..787a3f7dc6d12 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -1,7 +1,7 @@ --- type: integration title: '@astrojs/vercel' -description: Learn how to use the @astrojs/vercel SSR adapter to deploy your Astro project. +description: Learn how to use the @astrojs/vercel adapter to deploy your Astro project. sidebar: label: Vercel githubIntegrationURL: 'https://github.com/withastro/astro/tree/main/packages/integrations/vercel/' @@ -31,7 +31,7 @@ Learn how to deploy your Astro site in our [Vercel deployment guide](/en/guides/ Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Vercel adapter to enable SSR in your Astro project with the following `astro add` command. This will install `@astrojs/vercel` and make the appropriate changes to your `astro.config.mjs` file in one step. +Add the Vercel adapter to enable on demand rendering in your Astro project with the following `astro add` command. This will install `@astrojs/vercel` and make the appropriate changes to your `astro.config.mjs` file in one step. From 5c7b70a5a386fe64e15ee616251d5ab8adbb0f13 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:10:52 +0000 Subject: [PATCH 04/17] remove output server from all Vercel code examples --- .../en/guides/integrations-guide/vercel.mdx | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index 787a3f7dc6d12..2c99a50cdfddd 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -113,13 +113,12 @@ With `@vercel/analytics@1.3.x` or earlier, you can set `webAnalytics: { enabled: For `@vercel/analytics@1.4.0` and later, use Vercel's Analytics component to enable [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics) instead. -```js title="astro.config.mjs" ins={8-10} +```js title="astro.config.mjs" ins={7-9} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ webAnalytics: { enabled: true, @@ -205,13 +204,12 @@ Allows you to configure which image service to use in development when [imageSer It can also be set to any arbitrary value in order to use a custom image service instead of Astro's built-in ones. -```js title="astro.config.mjs" ins={8-9} +```js title="astro.config.mjs" ins={7-8} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ imageService: true, devImageService: 'sharp', @@ -230,13 +228,12 @@ Allows your project to be deployed as an [ISR (Incremental Static Regeneration)] To enable this feature, set `isr` to true in your Vercel adapter configuration in `astro.config.mjs`: -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ isr: true, }), @@ -253,13 +250,12 @@ By default, an ISR function caches for the duration of your deployment. You can You can change the length of time to cache routes this by configuring an `expiration` value in seconds: -```js title="astro.config.mjs" {8-11} +```js title="astro.config.mjs" {7-10} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ isr: { // caches all pages on first request and saves for 1 day @@ -273,12 +269,11 @@ export default defineConfig({ To implement Vercel's [Draft mode](https://vercel.com/docs/build-output-api/v3/features#draft-mode), or [On-Demand Incremental Static Regeneration (ISR)](https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr), you can create a bypass token and provide it to the `isr` config along with any routes to exclude from caching: -```js title="astro.config.mjs" {7-16} +```js title="astro.config.mjs" {6-15} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ - output: "server", adapter: vercel({ isr: { // A secret random string that you create. @@ -301,13 +296,12 @@ export default defineConfig({ Use this property to force files to be bundled with your function. This is helpful when you notice missing files. -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ includeFiles: ['./my-data.json'], }), @@ -321,13 +315,12 @@ export default defineConfig({ Use this property to exclude any files from the bundling process that would otherwise be included. -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ excludeFiles: ['./src/some_big_file.jpg'], }), @@ -341,13 +334,12 @@ export default defineConfig({ Use this property to extend or limit the maximum duration (in seconds) that Serverless Functions can run before timing out. See the [Vercel documentation](https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration) for the default and maximum limit for your account plan. -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: "server", adapter: vercel({ maxDuration: 60 }), @@ -362,13 +354,12 @@ export default defineConfig({ Use this property to enable [Vercel Skew protection](https://vercel.com/docs/deployments/skew-protection) (available with Vercel Pro and Enterprise accounts). -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: "server", adapter: vercel({ skewProtection: true }), @@ -389,7 +380,6 @@ import vercel from '@astrojs/vercel'; export default defineConfig({ // ... - output: 'server', adapter: vercel({ edgeMiddleware: true, }), From a448a7c52cbe6996c3ad71fc3bd50e87914ef820 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:14:32 +0000 Subject: [PATCH 05/17] remove output server from Netlify examples --- .../en/guides/integrations-guide/netlify.mdx | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index 946afde69063d..4e90744378560 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -102,13 +102,12 @@ Any Astro middleware is applied to pre-rendered pages at build-time, and to on-d To implement redirects, access control, or custom response headers for pre-rendered pages, run your middleware on Netlify Edge Functions by enabling the [`edgeMiddleware` option](/en/reference/adapter-reference/#edgemiddleware): -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify({ edgeMiddleware: true, }), @@ -156,13 +155,12 @@ It's implemented using an [Astro Image Service](/en/reference/image-service-refe To opt out of Netlify's Image CDN remote image optimization, use the `imageCDN` option: -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify({ imageCDN: false, }), @@ -171,13 +169,12 @@ export default defineConfig({ If you are using images hosted on another domain, you must authorize the domain or URL patterns using the [`image.domains`](/en/reference/configuration-reference/#imagedomains) or [`image.remotePatterns`](/en/reference/configuration-reference/#imageremotepatterns) configuration options: -```js title="astro.config.mjs" ins={8-10} +```js title="astro.config.mjs" ins={7-9} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify(), image: { domains: ['example.com'], @@ -224,10 +221,9 @@ Astro automatically configures [Netlify Blobs](https://docs.netlify.com/blobs/ov On-demand rendered pages without any dynamic content can be cached to improve performance and lower resource usage. Enabling the `cacheOnDemandPages` option in the adapter will cache all server-rendered pages for up to one year: -```ts title="astro.config.mjs" +```ts title="astro.config.mjs" ins={4} export default defineConfig({ // ... - output: 'server', adapter: netlify({ cacheOnDemandPages: true, }), @@ -271,13 +267,12 @@ The `includeFiles` property allows you to explicitly specify additional files th Provide an array of additional files to include with file paths relative to your project's [`root`](/en/reference/configuration-reference/#root). Absolute paths may not work as expected. -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify({ includeFiles: ['./my-data.json'], // relative to `root` }), @@ -299,13 +294,12 @@ You can use the `excludeFiles` property to prevent specific files from being bun Provide an array of specific files to exclude with file paths relative to your project's [`root`](/en/reference/configuration-reference/#root). Absolute paths may not work as expected. -```js title="astro.config.mjs" ins={8} +```js title="astro.config.mjs" ins={7} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ // ... - output: 'server', adapter: netlify({ excludeFiles: ['./src/some_big_file.jpg'], // relative to `root` }), @@ -316,12 +310,11 @@ export default defineConfig({ Both `includeFiles` and `excludeFiles` support [glob patterns](/en/guides/imports/#glob-patterns) for matching multiple files: -```js title="astro.config.mjs" ins={8, 11-12} +```js title="astro.config.mjs" ins={7, 10-11} import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify'; export default defineConfig({ - output: 'server', adapter: netlify({ includeFiles: [ './data/**/*.json' From 065c445245c3cde8d251df1c7db5efb2c382f9aa Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:16:36 +0000 Subject: [PATCH 06/17] removes output server from Cloudflare examples --- .../docs/en/guides/integrations-guide/cloudflare.mdx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 3e9c113389f45..f7ce587ac5849 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -122,7 +122,6 @@ export default defineConfig({ adapter: cloudflare({ imageService: 'cloudflare' }), - output: 'server' }) ``` @@ -484,13 +483,12 @@ import { Buffer } from 'node:buffer'; You'll also need to modify the `vite` configuration in your Astro config to allow for the `node:*` import syntax: -```js title="astro.config.mjs" ins={7-11} +```js title="astro.config.mjs" ins={6-10} import {defineConfig} from "astro/config"; import cloudflare from '@astrojs/cloudflare'; export default defineConfig({ adapter: cloudflare({}), - output: 'server', vite: { ssr: { external: ['node:buffer'], @@ -527,10 +525,9 @@ Developing with [`wrangler`](https://developers.cloudflare.com/workers/wrangler/ Currently, errors during running your application in Wrangler are not very useful, due to the minification of your code. For better debugging, you can add `vite.build.minify = false` setting to your `astro.config.mjs`. -```js title="astro.config.mjs" ins={4-8} +```js title="astro.config.mjs" ins={3-7} export default defineConfig({ adapter: cloudflare(), - output: 'server', vite: { build: { minify: false, From c5683005d0b463323cc28f439b339bf2be70b097 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 19:54:47 +0000 Subject: [PATCH 07/17] update deploy guides to minimize adding adapter instructions --- .../docs/en/guides/deploy/cloudflare.mdx | 6 +- src/content/docs/en/guides/deploy/netlify.mdx | 55 +++--------------- src/content/docs/en/guides/deploy/vercel.mdx | 56 ++++--------------- 3 files changed, 22 insertions(+), 95 deletions(-) diff --git a/src/content/docs/en/guides/deploy/cloudflare.mdx b/src/content/docs/en/guides/deploy/cloudflare.mdx index e559cffa99e73..2dd362f78d5f5 100644 --- a/src/content/docs/en/guides/deploy/cloudflare.mdx +++ b/src/content/docs/en/guides/deploy/cloudflare.mdx @@ -35,7 +35,7 @@ To get started, you will need: npm install wrangler@latest --save-dev ``` -2. If your site uses on demand rendering, install the `@astrojs/cloudflare` adapter. +2. If your site uses on demand rendering, install the [`@astrojs/cloudflare` adapter](/en/guides/integrations-guide/cloudflare/). This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. @@ -138,7 +138,7 @@ If you're using Workers Builds: npm install wrangler@latest --save-dev ``` -2. If your site uses on demand rendering, install the `@astrojs/cloudflare` adapter. +2. If your site uses on demand rendering, install the [`@astrojs/cloudflare` adapter](/en/guides/integrations-guide/cloudflare/). This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. @@ -186,7 +186,7 @@ Client-side hydration may fail as a result of Cloudflare's Auto Minify setting. ### Node.js runtime APIs -If you are building a project that is using on-demand rendering with [the Cloudflare SSR adapter](/en/guides/integrations-guide/cloudflare/) and the server fails to build with an error message such as `[Error] Could not resolve "XXXX. The package "XXXX" wasn't found on the file system but is built into node.`: +If you are building a project that is using on-demand rendering with [the Cloudflare adapter](/en/guides/integrations-guide/cloudflare/) and the server fails to build with an error message such as `[Error] Could not resolve "XXXX. The package "XXXX" wasn't found on the file system but is built into node.`: - This means that a package or import you are using in the server-side environment is not compatible with the [Cloudflare runtime APIs](https://developers.cloudflare.com/workers/runtime-apis/nodejs/). diff --git a/src/content/docs/en/guides/deploy/netlify.mdx b/src/content/docs/en/guides/deploy/netlify.mdx index 5dbca7d57d01b..d8929613c570f 100644 --- a/src/content/docs/en/guides/deploy/netlify.mdx +++ b/src/content/docs/en/guides/deploy/netlify.mdx @@ -13,67 +13,30 @@ import { Steps } from '@astrojs/starlight/components'; This guide includes instructions for deploying to Netlify through the website UI or Netlify's CLI. -## Project Configuration +## Project configuration Your Astro project can be deployed to Netlify in three different ways: as a static site, a server-rendered site, or an edge-rendered site. -### Static Site +### Static site Your Astro project is a static site by default. You don’t need any extra configuration to deploy a static Astro site to Netlify. -### Adapter for SSR +### Adapter for on-demand rendering -Add [the Netlify adapter](/en/guides/integrations-guide/netlify/) to enable SSR in your Astro project and deploy to Netlify with the following `astro add` command. This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. +Add [the Netlify adapter](/en/guides/integrations-guide/netlify/) to enable on-demand rendering in your Astro project and deploy to Netlify with the following `astro add` command. This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. ```bash npx astro add netlify ``` -If you prefer to install the adapter manually instead, complete the following two steps: +See the [Netlify adapter guide](/en/guides/integrations-guide/netlify/) to install manually instead, or for more configuration options, such as deploying your project’s Astro middleware using Netlify’s Edge Functions. - -1. Install [the `@astrojs/netlify` adapter](/en/guides/integrations-guide/netlify/) to your project’s dependencies using your preferred package manager. If you’re using npm or aren’t sure, run this in the terminal: - - ```bash - npm install @astrojs/netlify - ``` - -2. Add two new lines to your `astro.config.mjs` project configuration file. - - ```js title="astro.config.mjs" ins={2, 5-6} - import { defineConfig } from 'astro/config'; - import netlify from '@astrojs/netlify'; - - export default defineConfig({ - output: 'server', - adapter: netlify(), - }); - ``` - - You can also deploy your project's Astro middleware using Netlify's Edge Functions by adding `edgeMiddleware: true` to the Netlify adapter's configuration: - - ```diff lang="js" - // astro.config.mjs - import { defineConfig } from 'astro/config'; - import netlify from '@astrojs/netlify/functions'; - - export default defineConfig({ - output: 'server', - adapter: netlify({ - + edgeMiddleware: true - }), - }); - ``` - - - To run middleware for pre-rendered pages, set `edgeMiddleware: true`. This allows you to use middleware to implement authentication, redirects, or similar things, while still using static HTML output. - ## How to deploy -You can deploy to Netlify through the website UI or using Netlify’s CLI (command line interface). The process is the same for both static and SSR Astro sites. +You can deploy to Netlify through the website UI or using Netlify’s CLI (command line interface). The process is the same for both static and on-demand rendered Astro sites. -### Website UI Deployment +### Website UI deployment If your project is stored in GitHub, GitLab, BitBucket, or Azure DevOps, you can use the Netlify website UI to deploy your Astro site. @@ -108,7 +71,7 @@ To configure the default settings, create a `netlify.toml` file with the followi More info at [“Deploying an existing Astro Git repository”](https://www.netlify.com/blog/how-to-deploy-astro/#deploy-an-existing-git-repository-to-netlify) on Netlify’s blog -### CLI Deployment +### CLI deployment You can also create a new site on Netlify and link up your Git repository by installing and using the [Netlify CLI](https://cli.netlify.com/). @@ -134,7 +97,7 @@ You can also create a new site on Netlify and link up your Git repository by ins More details from Netlify on [Deploy an Astro site using the Netlify CLI](https://www.netlify.com/blog/how-to-deploy-astro/#link-your-astro-project-and-deploy-using-the-netlify-cli) -### Set a Node.js Version +### Set a Node.js version If you are using a legacy [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) (Xenial) on Netlify, make sure that your Node.js version is set. Astro requires `v18.17.1` or `v20.3.0` or higher. diff --git a/src/content/docs/en/guides/deploy/vercel.mdx b/src/content/docs/en/guides/deploy/vercel.mdx index b284c70b43f2f..cfb03377cd9ca 100644 --- a/src/content/docs/en/guides/deploy/vercel.mdx +++ b/src/content/docs/en/guides/deploy/vercel.mdx @@ -14,19 +14,17 @@ You can use [Vercel](http://vercel.com/) to deploy an Astro site to their global This guide includes instructions for deploying to Vercel through the website UI or Vercel's CLI. -## Project Configuration +## Project configuration -Your Astro project can be deployed to Vercel as a static site, or as a server-side rendered site (SSR). +Your Astro project can be deployed to Vercel as a static site, or a server-rendered site. -### Static Site +### Static site Your Astro project is a static site by default. You don’t need any extra configuration to deploy a static Astro site to Vercel. -### Adapter for SSR +### Adapter for on-demand rendering -To enable SSR in your Astro project and deploy on Vercel: - -Add [the Vercel adapter](/en/guides/integrations-guide/vercel/) to enable SSR in your Astro project with the following `astro add` command. This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. +Add [the Vercel adapter](/en/guides/integrations-guide/vercel/) to enable [on-demand rendering](/en/guides/on-demand-rendering/) in your Astro project with the following `astro add` command. This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step. @@ -46,47 +44,13 @@ Add [the Vercel adapter](/en/guides/integrations-guide/vercel/) to enable SSR in -If you prefer to install the adapter manually instead, complete the following two steps: - - -1. Install [the `@astrojs/vercel` adapter](/en/guides/integrations-guide/vercel/) to your project’s dependencies using your preferred package manager. - - - - ```shell - npm install @astrojs/vercel - ``` - - - ```shell - pnpm add @astrojs/vercel - ``` - - - ```shell - yarn add @astrojs/vercel - ``` - - - -1. Add two new lines to your `astro.config.mjs` project configuration file. - - ```js title="astro.config.mjs" ins={2, 5-6} - import { defineConfig } from 'astro/config'; - import vercel from '@astrojs/vercel'; - - export default defineConfig({ - output: 'server', - adapter: vercel(), - }); - ``` - +See the [Vercel adapter guide](/en/guides/integrations-guide/netlify/) to install manually instead, or for more configuration options, such as deploying your project’s Astro middleware using Vercel Edge Functions. ## How to deploy -You can deploy to Vercel through the website UI or using Vercel’s CLI (command line interface). The process is the same for both static and SSR Astro sites. +You can deploy to Vercel through the website UI or using Vercel’s CLI (command line interface). The process is the same for both static and on-demand rendered Astro sites. -### Website UI Deployment +### Website UI deployment 1. Push your code to your online Git repository (GitHub, GitLab, BitBucket). @@ -102,7 +66,7 @@ After your project has been imported and deployed, all subsequent pushes to bran Learn more about Vercel’s [Git Integration](https://vercel.com/docs/concepts/git). -### CLI Deployment +### CLI deployment 1. Install the [Vercel CLI](https://vercel.com/cli) and run `vercel` to deploy. @@ -135,7 +99,7 @@ After your project has been imported and deployed, all subsequent pushes to bran 4. Your application is deployed! (e.g. [astro.vercel.app](https://astro.vercel.app/)) -### Project config with vercel.json +### Project config with `vercel.json` You can use `vercel.json` to override the default behavior of Vercel and to configure additional settings. For example, you may wish to attach headers to HTTP responses from your Deployments. From 098d4062bf1ac2bca511db735b376cf999429219 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 20:01:53 +0000 Subject: [PATCH 08/17] double check for hyphens in on-demand rendering --- src/content/docs/en/guides/integrations-guide/cloudflare.mdx | 2 +- src/content/docs/en/guides/integrations-guide/netlify.mdx | 2 +- src/content/docs/en/guides/integrations-guide/node.mdx | 2 +- src/content/docs/en/guides/integrations-guide/vercel.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index f7ce587ac5849..9437d5d4e692c 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -367,7 +367,7 @@ This is available on Cloudflare Workers and Pages. ### Routes #### Routing on Cloudflare Workers -Routing for static assets is based on the file structure in the build directory (e.g. `./dist`). If no match is found, this will fall back to the Worker for on demand rendering. Read more about [static asset routing with Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/routing/). +Routing for static assets is based on the file structure in the build directory (e.g. `./dist`). If no match is found, this will fall back to the Worker for on-demand rendering. Read more about [static asset routing with Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/routing/). Unlike [Cloudflare Pages](#routing-on-cloudflare-pages), with Workers, you do not need a `_routes.json` file. diff --git a/src/content/docs/en/guides/integrations-guide/netlify.mdx b/src/content/docs/en/guides/integrations-guide/netlify.mdx index 4e90744378560..342f77e78bb69 100644 --- a/src/content/docs/en/guides/integrations-guide/netlify.mdx +++ b/src/content/docs/en/guides/integrations-guide/netlify.mdx @@ -25,7 +25,7 @@ Learn how to deploy your Astro site in our [Netlify deployment guide](/en/guides Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Netlify adapter to enable on demand rendering in your Astro project with the `astro add` command. +Add the Netlify adapter to enable on-demand rendering in your Astro project with the `astro add` command. This will install `@astrojs/netlify` and make the appropriate changes to your `astro.config.mjs` file in one step. diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index 8837454fdfb08..3a4060cd7335c 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -23,7 +23,7 @@ If you're using Astro as a static site builder, you don't need an adapter. Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Node adapter to enable on demand rendering in your Astro project with the `astro add` command. +Add the Node adapter to enable on-demand rendering in your Astro project with the `astro add` command. This will install `@astrojs/node` and make the appropriate changes to your `astro.config.*` file in one step. diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index 2c99a50cdfddd..25ad2475f7585 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -31,7 +31,7 @@ Learn how to deploy your Astro site in our [Vercel deployment guide](/en/guides/ Astro includes an `astro add` command to automate the setup of official integrations. If you prefer, you can [install integrations manually](#manual-install) instead. -Add the Vercel adapter to enable on demand rendering in your Astro project with the following `astro add` command. This will install `@astrojs/vercel` and make the appropriate changes to your `astro.config.mjs` file in one step. +Add the Vercel adapter to enable on-demand rendering in your Astro project with the following `astro add` command. This will install `@astrojs/vercel` and make the appropriate changes to your `astro.config.mjs` file in one step. From 186224200fd4e41156501b1d4ea1edbc995707c2 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 22:00:01 +0000 Subject: [PATCH 09/17] config reference proposed update to fix links and more --- src/content/docs/en/reference/configuration-reference.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx index 77847f4f52873..33c5d0e7e56d7 100644 --- a/src/content/docs/en/reference/configuration-reference.mdx +++ b/src/content/docs/en/reference/configuration-reference.mdx @@ -195,9 +195,9 @@ export default defineConfig({ **Type:** `AstroIntegration`

-Deploy to your favorite server, serverless, or edge host with build adapters. Import one of our first-party adapters for [Netlify](/en/guides/deploy/netlify/#adapter-for-ssr), [Vercel](/en/guides/deploy/vercel/#adapter-for-ssr), and more to engage Astro SSR. +Deploy to your favorite server, serverless, or edge host with build adapters. Import one of our first-party adapters ([Cloudflare](/en/guides/integrations-guide/cloudflare/), [Netlify](/en/guides/integrations-guide/netlify/), [Node.js](/en/guides/integrations-guide/node/), [Vercel](/en/guides/integrations-guide/vercel/)) or explore [community adapters](https://astro.build/integrations/2/?search=&categories%5B%5D=adapters) to enable on-demand rendering in your Astro project. -[See our On-demand Rendering guide](/en/guides/on-demand-rendering/) for more on SSR, and [our deployment guides](/en/guides/deploy/) for a complete list of hosts. +[See our on-demand rendering guide](/en/guides/on-demand-rendering/) for more on Astro's server rendering options. ```js import netlify from '@astrojs/netlify'; From e73beec227baa6a0dbfe1c17acde08599ae5ae6c Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Mon, 21 Apr 2025 19:02:34 -0300 Subject: [PATCH 10/17] Armand typo fixes Co-authored-by: Armand Philippot --- src/content/docs/en/guides/integrations-guide/node.mdx | 4 ++-- src/content/docs/en/guides/integrations-guide/vercel.mdx | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/node.mdx b/src/content/docs/en/guides/integrations-guide/node.mdx index 3a4060cd7335c..a4d1d2317ff7d 100644 --- a/src/content/docs/en/guides/integrations-guide/node.mdx +++ b/src/content/docs/en/guides/integrations-guide/node.mdx @@ -11,7 +11,7 @@ i18nReady: true import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' -This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to to Node targets, including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). +This adapter allows Astro to deploy your [on-demand rendered routes and features](/en/guides/on-demand-rendering/) to Node targets, including [server islands](/en/guides/server-islands/), [actions](/en/guides/actions/), and [sessions](/en/guides/sessions/). If you're using Astro as a static site builder, you don't need an adapter. @@ -68,7 +68,7 @@ First, add the Node adapter to your project’s dependencies using your preferre
-Then, add the adapterto your `astro.config.*` file: +Then, add the adapter to your `astro.config.*` file: ```js title="astro.config.mjs" ins={2,5-7} import { defineConfig } from 'astro/config'; diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index 25ad2475f7585..8936536e057b4 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -19,11 +19,7 @@ If you're using Astro as a static site builder, you only need this adapter if yo Learn how to deploy your Astro site in our [Vercel deployment guide](/en/guides/deploy/vercel/). - - - - -## Why Astro Vercel +## Why Astro Vercel? [Vercel](https://www.vercel.com/) is a deployment platform that allows you to host your site by connecting directly to your GitHub repository. This adapter enhances the Astro build process to prepare your project for deployment through Vercel. From 73bdca66e5be14f0c47463c60ac5e44bb0174481 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 22:12:53 +0000 Subject: [PATCH 11/17] Update en.yml to remove SSR from some translatable UI --- src/content/docs/en/guides/deploy/cloudflare.mdx | 2 +- src/content/i18n/en.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/en/guides/deploy/cloudflare.mdx b/src/content/docs/en/guides/deploy/cloudflare.mdx index 2dd362f78d5f5..b49c17c72e462 100644 --- a/src/content/docs/en/guides/deploy/cloudflare.mdx +++ b/src/content/docs/en/guides/deploy/cloudflare.mdx @@ -10,7 +10,7 @@ import ReadMore from '~/components/ReadMore.astro'; import { Steps } from '@astrojs/starlight/components'; import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro'; -You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as SSR sites, to both [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/) and [Cloudflare Pages](https://pages.cloudflare.com/). +You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as server-rendered sites, to both [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/) and [Cloudflare Pages](https://pages.cloudflare.com/). This guide includes: diff --git a/src/content/i18n/en.yml b/src/content/i18n/en.yml index 47e90a2d96a5c..4740bde550f17 100644 --- a/src/content/i18n/en.yml +++ b/src/content/i18n/en.yml @@ -18,7 +18,7 @@ install.manualTab: Manual Setup # `` vocabulary deploy.sectionTitle: Deployment Guides deploy.altSectionTitle: More Deployment Guides -deploy.ssrTag: SSR +deploy.ssrTag: On demand deploy.staticTag: Static # CMS Guides vocabulary cms.navTitle: More CMS guides @@ -37,7 +37,7 @@ recipesLink.plural: Related recipes integrations.changelog: Changelog integrations.footerTitle: More integrations integrations.renderers: Front-end frameworks -integrations.adapters: SSR adapters +integrations.adapters: Adapters integrations.others: Other integrations integrations.more: More integrations # Checklist component From a4846c53cbc808670dd1711c92afe6e8b892fd2d Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 22:14:01 +0000 Subject: [PATCH 12/17] update SSR vocab on Cloudflare deploy --- src/content/docs/en/guides/deploy/cloudflare.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/guides/deploy/cloudflare.mdx b/src/content/docs/en/guides/deploy/cloudflare.mdx index b49c17c72e462..37d3afa6c7853 100644 --- a/src/content/docs/en/guides/deploy/cloudflare.mdx +++ b/src/content/docs/en/guides/deploy/cloudflare.mdx @@ -10,7 +10,7 @@ import ReadMore from '~/components/ReadMore.astro'; import { Steps } from '@astrojs/starlight/components'; import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro'; -You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as server-rendered sites, to both [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/) and [Cloudflare Pages](https://pages.cloudflare.com/). +You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as on-demand rendered sites, to both [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/) and [Cloudflare Pages](https://pages.cloudflare.com/). This guide includes: @@ -49,7 +49,7 @@ To get started, you will need: _routes.json ``` - Read more about [on demand rendering (also known as SSR) in Astro](/en/guides/on-demand-rendering/). + Read more about [on-demand rendering in Astro](/en/guides/on-demand-rendering/). 3. Create a [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/). From 42b15c15c2213d465b13bf72a712dc041ea56cb0 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 21 Apr 2025 23:13:55 +0000 Subject: [PATCH 13/17] update StaticSSRTabs to use translated string --- src/components/tabs/StaticSsrTabs.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tabs/StaticSsrTabs.astro b/src/components/tabs/StaticSsrTabs.astro index f2d0943f5feb1..087b64fee6c9d 100644 --- a/src/components/tabs/StaticSsrTabs.astro +++ b/src/components/tabs/StaticSsrTabs.astro @@ -3,10 +3,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; --- - + - + From 085b31005328667a9e56c4462940e85a7ac2bc01 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Mon, 21 Apr 2025 21:28:56 -0300 Subject: [PATCH 14/17] fix link from copy/paste Co-authored-by: Armand Philippot --- src/content/docs/en/guides/deploy/vercel.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/deploy/vercel.mdx b/src/content/docs/en/guides/deploy/vercel.mdx index cfb03377cd9ca..32b2263b98b9a 100644 --- a/src/content/docs/en/guides/deploy/vercel.mdx +++ b/src/content/docs/en/guides/deploy/vercel.mdx @@ -44,7 +44,7 @@ Add [the Vercel adapter](/en/guides/integrations-guide/vercel/) to enable [on-de
-See the [Vercel adapter guide](/en/guides/integrations-guide/netlify/) to install manually instead, or for more configuration options, such as deploying your project’s Astro middleware using Vercel Edge Functions. +See the [Vercel adapter guide](/en/guides/integrations-guide/vercel/) to install manually instead, or for more configuration options, such as deploying your project’s Astro middleware using Vercel Edge Functions. ## How to deploy From 49b9cfe76b9afda2f98c807cafe865ac44b96d08 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:15:49 -0300 Subject: [PATCH 15/17] updates definition tense: configure -> configures --- src/content/docs/en/guides/integrations-guide/cloudflare.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx index 9437d5d4e692c..06162d3cb3e35 100644 --- a/src/content/docs/en/guides/integrations-guide/cloudflare.mdx +++ b/src/content/docs/en/guides/integrations-guide/cloudflare.mdx @@ -212,7 +212,7 @@ Configure additional routes to be generated on demand by the Cloudflare adapter **Default:** `undefined`

-Configure routes to be excluded from on-demand rendering in the `routes.extend.exclude` array. These routes will be prerendered and served statically instead, and will not invoke the server function. Additionally you can use this option to serve any static asset (e.g. images, fonts, css, js, html, txt, json, etc.) files directly without routing the request through the server function. +Configures routes to be excluded from on-demand rendering in the `routes.extend.exclude` array. These routes will be prerendered and served statically instead, and will not invoke the server function. Additionally you can use this option to serve any static asset (e.g. images, fonts, css, js, html, txt, json, etc.) files directly without routing the request through the server function. ```js title="astro.config.mjs" export default defineConfig({ From 588bd419baebdace1014caa04f87d3b43305ae96 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Sun, 27 Apr 2025 11:55:58 -0300 Subject: [PATCH 16/17] better link text --- src/content/docs/en/reference/configuration-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/reference/configuration-reference.mdx b/src/content/docs/en/reference/configuration-reference.mdx index 0a2ed54f7b851..95733cf1b3c80 100644 --- a/src/content/docs/en/reference/configuration-reference.mdx +++ b/src/content/docs/en/reference/configuration-reference.mdx @@ -197,7 +197,7 @@ export default defineConfig({ Deploy to your favorite server, serverless, or edge host with build adapters. Import one of our first-party adapters ([Cloudflare](/en/guides/integrations-guide/cloudflare/), [Netlify](/en/guides/integrations-guide/netlify/), [Node.js](/en/guides/integrations-guide/node/), [Vercel](/en/guides/integrations-guide/vercel/)) or explore [community adapters](https://astro.build/integrations/2/?search=&categories%5B%5D=adapters) to enable on-demand rendering in your Astro project. -[See our on-demand rendering guide](/en/guides/on-demand-rendering/) for more on Astro's server rendering options. +See our [on-demand rendering guide](/en/guides/on-demand-rendering/) for more on Astro's server rendering options. ```js import netlify from '@astrojs/netlify'; From 84e6d477cfec00518e4f0391cadc4e9c5d2d369b Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Mon, 28 Apr 2025 04:53:00 -0700 Subject: [PATCH 17/17] ci: update configuration reference docs (#11544) Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com>