Skip to content

Commit 145f3bb

Browse files
committed
feat: Live Preview 2.0 support
Signed-off-by: Amitkanswal <[email protected]>
1 parent 2ebf10b commit 145f3bb

File tree

8 files changed

+262
-523
lines changed

8 files changed

+262
-523
lines changed

.env.sample

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
# provide stack & region details below
1+
#create environment file name as .env
2+
#and place following configuration data.
23

3-
VUE_APP_CONTENTSTACK_API_KEY = <your-stack-api-key>
4-
VUE_APP_CONTENTSTACK_DELIVERY_TOKEN = <your-delivery-token>
5-
VUE_APP_CONTENTSTACK_ENVIRONMENT = <your-publishing-environment>
64

7-
# Below credentials are for Live Preview feature and are mandatory for enabling live preview in your starter app
8-
# Optional if not enabling live preview
5+
VUE_APP_CONTENTSTACK_API_KEY=your_stack_api_key
6+
VUE_APP_CONTENTSTACK_DELIVERY_TOKEN=your_delivery_token
7+
VUE_APP_CONTENTSTACK_ENVIRONMENT=your_environment_token
98

10-
VUE_APP_CONTENTSTACK_MANAGEMENT_TOKEN= <your-management-token>
11-
VUE_APP_CONTENTSTACK_API_HOST= <your-api-host>
12-
VUE_APP_CONTENTSTACK_APP_HOST= <your-app-host>
9+
# Below config options are for enabling live preview/live edit tags for the starter app
10+
11+
VUE_APP_CONTENTSTACK_PREVIEW_HOST= rest-preview.contentstack.com
12+
VUE_APP_CONTENTSTACK_PREVIEW_TOKEN= your_live_preview_token
13+
VUE_APP_CONTENTSTACK_APP_HOST=app.contentstack.com
1314
VUE_APP_CONTENTSTACK_LIVE_PREVIEW= true
15+
VUE_APP_CONTENTSTACK_LIVE_EDIT_TAGS= false
16+
1417

15-
# VUE_APP_CONTENTSTACK_LIVE_PREVIEW = true (will be true by default to disable live preview feature please provide value false)
16-
# VUE_APP_CONTENTSTACK_APP_HOST = (for NA region 'app.contentstack.com' anf for EU region 'eu-app.contentstack.com')
17-
# VUE_APP_CONTENTSTACK_API_HOST= (for NA region 'api.contentstack.io' and for EU region 'eu-api.contentstack.com')
18+
# VUE_APP_CONTENTSTACK_API_HOST=api.contentstack.io
19+
# VUE_APP_CONTENTSTACK_REGION=eu
20+
# VUE_APP_CONTENTSTACK_BRANCH=main
1821

19-
# By default branch=main, if a branch is not provided
20-
# VUE_APP_CONTENTSTACK_BRANCH=<your_branch_name>
22+
### NOTE:
23+
# VUE_APP_CONTENTSTACK_API_HOST- For setting custom api host for contentstack sdk
24+
# VUE_APP_CONTENTSTACK_REGION- For setting custom region for contentstack sdk default is us
25+
# VUE_APP_CONTENTSTACK_BRANCH- For setting custom branch for contentstack sdk default is main
2126

22-
# By default region=us, if a region is not provided
23-
# VUE_APP_CONTENTSTACK_REGION=<your_region_name>
27+
# Setting Live Preview URL's
28+
# VUE_APP_CONTENTSTACK_PREVIEW_HOST- For eu region use eu-rest-preview.contentstack.com/azure-na-rest-preview.contentstack.com/azure-eu-rest-preview.contentstack.com

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: [
3+
'plugin:vue/vue3-recommended',
4+
],
5+
rules: {
6+
'@typescript-eslint/no-explicit-any': 'off',
7+
},
8+
};

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Contentstack
3+
Copyright (c) 2024 Contentstack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)