Skip to content

Commit

Permalink
[Docs] Update Deploying to Vercel walkthrough (#822)
Browse files Browse the repository at this point in the history
* Update Deploying to Vercel walkthrough
- specify VERCEL_URL env variable
- add code snippet that should replace publicUrl in
next.config

* Remove VERCEL_URL reference

(cherry picked from commit 0f1bb3f)
  • Loading branch information
CobyPear committed Sep 29, 2021
1 parent f041721 commit 265af6b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This guide will demonstrate deploying the Next.js sample app that's generated by
* `SITECORE_API_HOST` - your Sitecore API hostname. The `SITECORE_API_HOST` is not required for Sitecore Experience Edge.
* `JSS_EDITING_SECRET` - your secret token. The `JSS_EDITING_SECRET` is optional for deployments but necessary if you want to use the Experience Editor with your Next.js Vercel deployment. Read about [connecting your Next.js application to the Experience Editor](/docs/nextjs/experience-editor/walkthrough).
* `GRAPH_QL_ENDPOINT` - your GraphQL endpoint. The `GRAPH_QL_ENDPOINT` is required for Sitecore Experience Edge. For Sitecore XM, this is typically optional. By default, the endpoint is calculated using the resolved Sitecore API hostname + the `graphQLEndpointPath` defined in your `package.json`.
2. In the `next.config`, replace `const publicUrl = process.env.PUBLIC_URL;` with ``const publicUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : process.env.PUBLIC_URL;``
3. Push the changes to your Git provider.

## Video demonstration
Expand Down

0 comments on commit 265af6b

Please sign in to comment.