Skip to content

Commit 1d380dd

Browse files
committed
fix: updated code and sdk for live preview [ECO-398]
1 parent 174c741 commit 1d380dd

File tree

13 files changed

+542
-11780
lines changed

13 files changed

+542
-11780
lines changed

.env.sample renamed to .env.local.sample

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ CONTENTSTACK_API_KEY=YOUR_API_KEY
66
CONTENTSTACK_DELIVERY_TOKEN=YOUR_DELIVERY_TOKEN
77
CONTENTSTACK_ENVIRONMENT=YOUR_PUBLISHING_ENVIRONMENT
88

9-
# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu
10-
119
# For live preview
1210
CONTENTSTACK_MANAGEMENT_TOKEN=
1311
CONTENTSTACK_API_HOST=
1412
CONTENTSTACK_APP_HOST=
15-
NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW=
13+
CONTENTSTACK_LIVE_PREVIEW=true
1614

1715
# For enabling live editing tags for this project set NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW=true by default it is set to false
1816
# For NA region add CONTENTSTACK_APP_HOST=app.contentstack.com
1917
# For EU region add CONTENTSTACK_APP_HOST=eu-app.contentstack.com
2018
# For setting region add CONTENTSTACK_REGION=(Optional for US region) Eg- eu
21-
# For setting custom host add CONTENTSTACK_API_HOST=for(NA: api.contentstack.com, EU: eu-api.contentstack.com)
19+
# For setting custom host add CONTENTSTACK_API_HOST=for(NA: api.contentstack.io, EU: eu-api.contentstack.com)

next.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ const config = {
66
CONTENTSTACK_API_KEY: process.env.CONTENTSTACK_API_KEY,
77
CONTENTSTACK_DELIVERY_TOKEN: process.env.CONTENTSTACK_DELIVERY_TOKEN,
88
CONTENTSTACK_ENVIRONMENT: process.env.CONTENTSTACK_ENVIRONMENT,
9-
CONTENTSTACK_REGION: process.env.CONTENTSTACK_REGION || "us",
109
CONTENTSTACK_MANAGEMENT_TOKEN: process.env.CONTENTSTACK_MANAGEMENT_TOKEN,
1110
CONTENTSTACK_API_HOST: process.env.CONTENTSTACK_API_HOST || "api.contentstack.io",
1211
CONTENTSTACK_APP_HOST: process.env.CONTENTSTACK_APP_HOST || "app.contentstack.com",
1312
NEXT_PUBLIC_CONTENTSTACK_API_KEY: process.env.CONTENTSTACK_API_KEY,
14-
NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW: process.env.NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW || 'false',
15-
NEXT_PUBLIC_CONTENTSTACK_LIVE_EDIT_TAGS:
16-
process.env.NEXT_PUBLIC_CONTENTSTACK_LIVE_EDIT_TAGS || 'false',
13+
CONTENTSTACK_LIVE_PREVIEW: process.env.NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW || 'true',
1714
},
1815
devIndicators: {
1916
autoPrerender: false,

0 commit comments

Comments
 (0)