Running Astro as SSG on Vercel without adapter (#4299)
Fixes the 404 handling.
This commit is contained in:
parent
7820096e1b
commit
8264f85f1d
1 changed files with 9 additions and 1 deletions
|
@ -12,7 +12,15 @@ This adapter allows Astro to deploy your SSR site to [Vercel](https://www.vercel
|
||||||
|
|
||||||
## Why Astro Vercel
|
## Why Astro Vercel
|
||||||
|
|
||||||
If you're using Astro as a static site builder—its behavior out of the box—you don't need an adapter.
|
If you're using Astro as a static site builder — its behavior out of the box — you don't need an adapter. In order to return the correct status code for non existing pages, you must add the following config file at the root of your project:
|
||||||
|
|
||||||
|
__`vercel.json`__
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"cleanUrls": true,
|
||||||
|
"trailingSlash": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
If you wish to [use server-side rendering (SSR)](https://docs.astro.build/en/guides/server-side-rendering/), Astro requires an adapter that matches your deployment runtime.
|
If you wish to [use server-side rendering (SSR)](https://docs.astro.build/en/guides/server-side-rendering/), Astro requires an adapter that matches your deployment runtime.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue