Skip to content
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

Add mode and deploy options #1088

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions src/pages/en/reference/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ The base path you're deploying to. Astro will match this pathname during develop
}
```

### mode

<p>

**Type:** `('static' | 'server')`
</p>

Specifies which `mode` Astro runs in. The options are:

* `static` - The default, builds your site to static HTML for deployment to any static host.
* `server` - Builds your site to be deployed to a server host for SSR (server-side rendering).

```js
mode: 'static'
```

If the mode is set to `server` then a `deploy` configuration option must also be set before building.

### trailingSlash

Expand Down Expand Up @@ -360,7 +377,7 @@ Pass a custom [Rehype](https://github.com/remarkjs/remark-rehype) plugin to cust
```


## Adapter
## Deploy

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-ssredge), [Vercel](/en/guides/deploy/vercel/#adapter-for-ssr), and more to engage Astro SSR.

Expand All @@ -369,8 +386,10 @@ Deploy to your favorite server, serverless, or edge host with build adapters. Im
```js
import netlify from '@astrojs/netlify/functions';
{
mode: 'server',

// Example: Build for Netlify serverless deployment
adapter: netlify(),
deploy: netlify(),
}
```

Expand Down