create-content-sdk-app 2.0.2-canary.8 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +202 -202
- package/dist/templates/nextjs/.cursor/rules/general.mdc +81 -81
- package/dist/templates/nextjs/.cursor/rules/javascript.mdc +112 -112
- package/dist/templates/nextjs/.cursor/rules/project-setup.mdc +100 -100
- package/dist/templates/nextjs/.cursor/rules/sitecore.mdc +150 -150
- package/dist/templates/nextjs/.env.container.example +27 -27
- package/dist/templates/nextjs/.env.remote.example +51 -51
- package/dist/templates/nextjs/.gitattributes +11 -11
- package/dist/templates/nextjs/.prettierrc +8 -8
- package/dist/templates/nextjs/.vscode/extensions.json +8 -8
- package/dist/templates/nextjs/.vscode/launch.json +15 -15
- package/dist/templates/nextjs/.windsurfrules +186 -186
- package/dist/templates/nextjs/LICENSE.txt +202 -202
- package/dist/templates/nextjs/eslint.config.mjs +81 -81
- package/dist/templates/nextjs/gitignore +28 -28
- package/dist/templates/nextjs/package.json +68 -68
- package/dist/templates/nextjs/sitecore.config.ts.example +40 -40
- package/dist/templates/nextjs/src/proxy.ts +3 -11
- package/dist/templates/nextjs/tsconfig.json +40 -40
- package/dist/templates/nextjs-app-router/.cursor/rules/app-router-setup.mdc +116 -116
- package/dist/templates/nextjs-app-router/.cursor/rules/general.mdc +80 -80
- package/dist/templates/nextjs-app-router/.cursor/rules/javascript.mdc +112 -112
- package/dist/templates/nextjs-app-router/.cursor/rules/sitecore.mdc +174 -174
- package/dist/templates/nextjs-app-router/.env.container.example +27 -27
- package/dist/templates/nextjs-app-router/.env.remote.example +51 -51
- package/dist/templates/nextjs-app-router/.gitattributes +11 -11
- package/dist/templates/nextjs-app-router/.windsurfrules +290 -290
- package/dist/templates/nextjs-app-router/eslint.config.mjs +29 -29
- package/dist/templates/nextjs-app-router/gitignore +31 -31
- package/dist/templates/nextjs-app-router/package.json +55 -55
- package/dist/templates/nextjs-app-router/postcss.config.mjs +5 -5
- package/dist/templates/nextjs-app-router/sitecore.config.ts.example +40 -40
- package/dist/templates/nextjs-app-router/src/app/globals.css +1 -1
- package/dist/templates/nextjs-app-router/src/proxy.ts +3 -11
- package/dist/templates/nextjs-app-router/tsconfig.json +48 -48
- package/package.json +2 -2
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Sitecore development patterns for your project
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
globs:
|
|
5
|
-
- 'src/components/**'
|
|
6
|
-
- 'src/lib/**'
|
|
7
|
-
- 'sitecore.config.ts'
|
|
8
|
-
- '**/*sitecore*'
|
|
9
|
-
- '**/*content*'
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Sitecore Development Patterns
|
|
13
|
-
|
|
14
|
-
## Component Development
|
|
15
|
-
|
|
16
|
-
Sitecore Component Naming:
|
|
17
|
-
|
|
18
|
-
- Use descriptive, feature-based names: `HeroWithContent`, `ProductListing`, `ContentBlockGrid`
|
|
19
|
-
- Follow PascalCase convention
|
|
20
|
-
- Include component type in name when helpful: `LayoutContainer`, `ContentRenderer`
|
|
21
|
-
|
|
22
|
-
Component Registration:
|
|
23
|
-
|
|
24
|
-
- Export component from component file
|
|
25
|
-
- Use descriptive, PascalCase names
|
|
26
|
-
- Include TypeScript interfaces for props
|
|
27
|
-
- Handle missing fields gracefully
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
// Component props interface
|
|
31
|
-
interface HeroProps {
|
|
32
|
-
fields: {
|
|
33
|
-
title: Field;
|
|
34
|
-
subtitle: Field;
|
|
35
|
-
backgroundImage: Field;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default function Hero({ fields }: HeroProps) {
|
|
40
|
-
return (
|
|
41
|
-
<div>
|
|
42
|
-
<Text field={fields?.title} tag="h1" />
|
|
43
|
-
<Text field={fields?.subtitle} tag="p" />
|
|
44
|
-
<Image field={fields?.backgroundImage} />
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Content Management
|
|
51
|
-
|
|
52
|
-
Field Handling:
|
|
53
|
-
|
|
54
|
-
- Always validate field existence before rendering
|
|
55
|
-
- Use helper functions for common field operations
|
|
56
|
-
- Handle empty/null fields gracefully
|
|
57
|
-
- Prefer Sitecore field components over manual rendering
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// Good: Using Sitecore field components
|
|
61
|
-
<Text field={fields?.title} tag="h1" />
|
|
62
|
-
<RichText field={fields?.content} />
|
|
63
|
-
|
|
64
|
-
// Avoid: Manual field value extraction unless necessary
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Layout Service:
|
|
68
|
-
|
|
69
|
-
- Use the Layout Service for page data fetching
|
|
70
|
-
- Implement proper error boundaries for layout rendering
|
|
71
|
-
- Handle missing placeholder content gracefully
|
|
72
|
-
- Cache layout data when appropriate
|
|
73
|
-
|
|
74
|
-
## Configuration
|
|
75
|
-
|
|
76
|
-
Environment Setup:
|
|
77
|
-
|
|
78
|
-
- Use `.env.local` for local development
|
|
79
|
-
- Never commit API keys to version control
|
|
80
|
-
- Use `.env.example` to document required variables
|
|
81
|
-
- Configure Sitecore endpoints in `sitecore.config.ts`
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
// sitecore.config.ts
|
|
85
|
-
import { defineConfig } from '@sitecore-content-sdk/nextjs/config';
|
|
86
|
-
|
|
87
|
-
export default defineConfig({
|
|
88
|
-
api: {
|
|
89
|
-
edge: {
|
|
90
|
-
contextId: process.env.SITECORE_EDGE_CONTEXT_ID || '',
|
|
91
|
-
clientContextId: process.env.NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID,
|
|
92
|
-
edgeUrl:
|
|
93
|
-
process.env.NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME ||
|
|
94
|
-
process.env.SITECORE_EDGE_PLATFORM_HOSTNAME ||
|
|
95
|
-
'https://edge-platform.sitecorecloud.io',
|
|
96
|
-
},
|
|
97
|
-
local: {
|
|
98
|
-
apiKey: process.env.SITECORE_API_KEY || '',
|
|
99
|
-
apiHost: process.env.SITECORE_API_HOST || '',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
defaultSite: process.env.NEXT_PUBLIC_DEFAULT_SITE_NAME || 'default',
|
|
103
|
-
defaultLanguage: process.env.NEXT_PUBLIC_DEFAULT_LANGUAGE || 'en',
|
|
104
|
-
editingSecret: process.env.SITECORE_EDITING_SECRET,
|
|
105
|
-
});
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Security and Performance
|
|
109
|
-
|
|
110
|
-
Security Best Practices:
|
|
111
|
-
|
|
112
|
-
- Sanitize user inputs before processing
|
|
113
|
-
- Validate content from Sitecore before rendering
|
|
114
|
-
- Use HTTPS for all Sitecore connections
|
|
115
|
-
- Never expose sensitive configuration in client-side code
|
|
116
|
-
|
|
117
|
-
Content Fetching:
|
|
118
|
-
|
|
119
|
-
- Implement caching strategy for content (React Query recommended)
|
|
120
|
-
- Use GraphQL queries efficiently (avoid over-fetching)
|
|
121
|
-
- Implement proper loading states and error handling
|
|
122
|
-
- Consider content preview vs. published content scenarios
|
|
123
|
-
|
|
124
|
-
## Development Patterns
|
|
125
|
-
|
|
126
|
-
Error Handling:
|
|
127
|
-
|
|
128
|
-
- Create custom error classes: `SitecoreFetchError`, `ComponentRenderError`
|
|
129
|
-
- Log errors appropriately for debugging
|
|
130
|
-
- Provide fallback content when components fail to render
|
|
131
|
-
- Use error boundaries in React applications
|
|
132
|
-
|
|
133
|
-
Placeholder Management:
|
|
134
|
-
|
|
135
|
-
- Use strongly-typed placeholder names
|
|
136
|
-
- Handle dynamic placeholders appropriately
|
|
137
|
-
- Implement fallback rendering for missing placeholders
|
|
138
|
-
- Follow Sitecore's placeholder naming conventions
|
|
139
|
-
|
|
140
|
-
Testing:
|
|
141
|
-
|
|
142
|
-
- Mock Sitecore services in unit tests
|
|
143
|
-
- Test component rendering with various field configurations
|
|
144
|
-
- Include tests for error scenarios (missing fields, API failures)
|
|
145
|
-
- Use Sitecore's test data helpers when available
|
|
146
|
-
|
|
147
|
-
Referenced:
|
|
148
|
-
@src/components/
|
|
149
|
-
@sitecore.config.ts
|
|
150
|
-
@.env.example
|
|
1
|
+
---
|
|
2
|
+
description: Sitecore development patterns for your project
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
globs:
|
|
5
|
+
- 'src/components/**'
|
|
6
|
+
- 'src/lib/**'
|
|
7
|
+
- 'sitecore.config.ts'
|
|
8
|
+
- '**/*sitecore*'
|
|
9
|
+
- '**/*content*'
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Sitecore Development Patterns
|
|
13
|
+
|
|
14
|
+
## Component Development
|
|
15
|
+
|
|
16
|
+
Sitecore Component Naming:
|
|
17
|
+
|
|
18
|
+
- Use descriptive, feature-based names: `HeroWithContent`, `ProductListing`, `ContentBlockGrid`
|
|
19
|
+
- Follow PascalCase convention
|
|
20
|
+
- Include component type in name when helpful: `LayoutContainer`, `ContentRenderer`
|
|
21
|
+
|
|
22
|
+
Component Registration:
|
|
23
|
+
|
|
24
|
+
- Export component from component file
|
|
25
|
+
- Use descriptive, PascalCase names
|
|
26
|
+
- Include TypeScript interfaces for props
|
|
27
|
+
- Handle missing fields gracefully
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Component props interface
|
|
31
|
+
interface HeroProps {
|
|
32
|
+
fields: {
|
|
33
|
+
title: Field;
|
|
34
|
+
subtitle: Field;
|
|
35
|
+
backgroundImage: Field;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default function Hero({ fields }: HeroProps) {
|
|
40
|
+
return (
|
|
41
|
+
<div>
|
|
42
|
+
<Text field={fields?.title} tag="h1" />
|
|
43
|
+
<Text field={fields?.subtitle} tag="p" />
|
|
44
|
+
<Image field={fields?.backgroundImage} />
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Content Management
|
|
51
|
+
|
|
52
|
+
Field Handling:
|
|
53
|
+
|
|
54
|
+
- Always validate field existence before rendering
|
|
55
|
+
- Use helper functions for common field operations
|
|
56
|
+
- Handle empty/null fields gracefully
|
|
57
|
+
- Prefer Sitecore field components over manual rendering
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// Good: Using Sitecore field components
|
|
61
|
+
<Text field={fields?.title} tag="h1" />
|
|
62
|
+
<RichText field={fields?.content} />
|
|
63
|
+
|
|
64
|
+
// Avoid: Manual field value extraction unless necessary
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Layout Service:
|
|
68
|
+
|
|
69
|
+
- Use the Layout Service for page data fetching
|
|
70
|
+
- Implement proper error boundaries for layout rendering
|
|
71
|
+
- Handle missing placeholder content gracefully
|
|
72
|
+
- Cache layout data when appropriate
|
|
73
|
+
|
|
74
|
+
## Configuration
|
|
75
|
+
|
|
76
|
+
Environment Setup:
|
|
77
|
+
|
|
78
|
+
- Use `.env.local` for local development
|
|
79
|
+
- Never commit API keys to version control
|
|
80
|
+
- Use `.env.example` to document required variables
|
|
81
|
+
- Configure Sitecore endpoints in `sitecore.config.ts`
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
// sitecore.config.ts
|
|
85
|
+
import { defineConfig } from '@sitecore-content-sdk/nextjs/config';
|
|
86
|
+
|
|
87
|
+
export default defineConfig({
|
|
88
|
+
api: {
|
|
89
|
+
edge: {
|
|
90
|
+
contextId: process.env.SITECORE_EDGE_CONTEXT_ID || '',
|
|
91
|
+
clientContextId: process.env.NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID,
|
|
92
|
+
edgeUrl:
|
|
93
|
+
process.env.NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME ||
|
|
94
|
+
process.env.SITECORE_EDGE_PLATFORM_HOSTNAME ||
|
|
95
|
+
'https://edge-platform.sitecorecloud.io',
|
|
96
|
+
},
|
|
97
|
+
local: {
|
|
98
|
+
apiKey: process.env.SITECORE_API_KEY || '',
|
|
99
|
+
apiHost: process.env.SITECORE_API_HOST || '',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
defaultSite: process.env.NEXT_PUBLIC_DEFAULT_SITE_NAME || 'default',
|
|
103
|
+
defaultLanguage: process.env.NEXT_PUBLIC_DEFAULT_LANGUAGE || 'en',
|
|
104
|
+
editingSecret: process.env.SITECORE_EDITING_SECRET,
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Security and Performance
|
|
109
|
+
|
|
110
|
+
Security Best Practices:
|
|
111
|
+
|
|
112
|
+
- Sanitize user inputs before processing
|
|
113
|
+
- Validate content from Sitecore before rendering
|
|
114
|
+
- Use HTTPS for all Sitecore connections
|
|
115
|
+
- Never expose sensitive configuration in client-side code
|
|
116
|
+
|
|
117
|
+
Content Fetching:
|
|
118
|
+
|
|
119
|
+
- Implement caching strategy for content (React Query recommended)
|
|
120
|
+
- Use GraphQL queries efficiently (avoid over-fetching)
|
|
121
|
+
- Implement proper loading states and error handling
|
|
122
|
+
- Consider content preview vs. published content scenarios
|
|
123
|
+
|
|
124
|
+
## Development Patterns
|
|
125
|
+
|
|
126
|
+
Error Handling:
|
|
127
|
+
|
|
128
|
+
- Create custom error classes: `SitecoreFetchError`, `ComponentRenderError`
|
|
129
|
+
- Log errors appropriately for debugging
|
|
130
|
+
- Provide fallback content when components fail to render
|
|
131
|
+
- Use error boundaries in React applications
|
|
132
|
+
|
|
133
|
+
Placeholder Management:
|
|
134
|
+
|
|
135
|
+
- Use strongly-typed placeholder names
|
|
136
|
+
- Handle dynamic placeholders appropriately
|
|
137
|
+
- Implement fallback rendering for missing placeholders
|
|
138
|
+
- Follow Sitecore's placeholder naming conventions
|
|
139
|
+
|
|
140
|
+
Testing:
|
|
141
|
+
|
|
142
|
+
- Mock Sitecore services in unit tests
|
|
143
|
+
- Test component rendering with various field configurations
|
|
144
|
+
- Include tests for error scenarios (missing fields, API failures)
|
|
145
|
+
- Use Sitecore's test data helpers when available
|
|
146
|
+
|
|
147
|
+
Referenced:
|
|
148
|
+
@src/components/
|
|
149
|
+
@sitecore.config.ts
|
|
150
|
+
@.env.example
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# This file should be copied to .env.local and modified with your environment variables to connect to your Sitecore container instance.
|
|
2
|
-
|
|
3
|
-
# To secure the Sitecore editor endpoint exposed by your Next.js app
|
|
4
|
-
# (`/api/editing/render` by default), a secret token is used. This (client-side)
|
|
5
|
-
SITECORE_EDITING_SECRET=
|
|
6
|
-
|
|
7
|
-
# Your Sitecore site name.
|
|
8
|
-
# The value of the variable represents the default/configured site.
|
|
9
|
-
NEXT_PUBLIC_DEFAULT_SITE_NAME=
|
|
10
|
-
|
|
11
|
-
# Your default app language.
|
|
12
|
-
NEXT_PUBLIC_DEFAULT_LANGUAGE=
|
|
13
|
-
|
|
14
|
-
# Your Sitecore API key is needed to build the app.
|
|
15
|
-
NEXT_PUBLIC_SITECORE_API_KEY=
|
|
16
|
-
|
|
17
|
-
# Your Sitecore API hostname is needed to build the app.
|
|
18
|
-
NEXT_PUBLIC_SITECORE_API_HOST=
|
|
19
|
-
|
|
20
|
-
# Sitecore Content SDK npm packages utilize the debug module for debug logging.
|
|
21
|
-
# https://www.npmjs.com/package/debug
|
|
22
|
-
# Set the DEBUG environment variable to 'content-sdk:*' to see all logs:
|
|
23
|
-
#DEBUG=content-sdk:*
|
|
24
|
-
# Or be selective and show for example only layout service logs:
|
|
25
|
-
#DEBUG=content-sdk:layout
|
|
26
|
-
# Or everything BUT layout service logs:
|
|
27
|
-
#DEBUG=content-sdk:*,-content-sdk:layout
|
|
1
|
+
# This file should be copied to .env.local and modified with your environment variables to connect to your Sitecore container instance.
|
|
2
|
+
|
|
3
|
+
# To secure the Sitecore editor endpoint exposed by your Next.js app
|
|
4
|
+
# (`/api/editing/render` by default), a secret token is used. This (client-side)
|
|
5
|
+
SITECORE_EDITING_SECRET=
|
|
6
|
+
|
|
7
|
+
# Your Sitecore site name.
|
|
8
|
+
# The value of the variable represents the default/configured site.
|
|
9
|
+
NEXT_PUBLIC_DEFAULT_SITE_NAME=
|
|
10
|
+
|
|
11
|
+
# Your default app language.
|
|
12
|
+
NEXT_PUBLIC_DEFAULT_LANGUAGE=
|
|
13
|
+
|
|
14
|
+
# Your Sitecore API key is needed to build the app.
|
|
15
|
+
NEXT_PUBLIC_SITECORE_API_KEY=
|
|
16
|
+
|
|
17
|
+
# Your Sitecore API hostname is needed to build the app.
|
|
18
|
+
NEXT_PUBLIC_SITECORE_API_HOST=
|
|
19
|
+
|
|
20
|
+
# Sitecore Content SDK npm packages utilize the debug module for debug logging.
|
|
21
|
+
# https://www.npmjs.com/package/debug
|
|
22
|
+
# Set the DEBUG environment variable to 'content-sdk:*' to see all logs:
|
|
23
|
+
#DEBUG=content-sdk:*
|
|
24
|
+
# Or be selective and show for example only layout service logs:
|
|
25
|
+
#DEBUG=content-sdk:layout
|
|
26
|
+
# Or everything BUT layout service logs:
|
|
27
|
+
#DEBUG=content-sdk:*,-content-sdk:layout
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# This file should be copied to .env.local and modified with your environment variables to connect to your remote Sitecore instance.
|
|
2
|
-
|
|
3
|
-
# To secure the Sitecore editor endpoint exposed by your Next.js app
|
|
4
|
-
# (`/api/editing/render` by default), a secret token is used. This (client-side)
|
|
5
|
-
SITECORE_EDITING_SECRET=
|
|
6
|
-
|
|
7
|
-
# Your Sitecore site name.
|
|
8
|
-
# The value of the variable represents the default/configured site.
|
|
9
|
-
NEXT_PUBLIC_DEFAULT_SITE_NAME=
|
|
10
|
-
|
|
11
|
-
# Your default app language.
|
|
12
|
-
NEXT_PUBLIC_DEFAULT_LANGUAGE=
|
|
13
|
-
|
|
14
|
-
# Your unified Sitecore Edge Context Id for server-side use.
|
|
15
|
-
# This will be used over any Sitecore Preview / Delivery Edge variables (above).
|
|
16
|
-
SITECORE_EDGE_CONTEXT_ID=
|
|
17
|
-
|
|
18
|
-
# Your Sitecore Edge Context Id for client-side use.
|
|
19
|
-
# Will be used as a fallback if separate SITECORE_EDGE_CONTEXT_ID value is not provided
|
|
20
|
-
NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID=
|
|
21
|
-
|
|
22
|
-
# Optional: custom Sitecore Edge Platform hostname (hostname or full URL).
|
|
23
|
-
NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME=
|
|
24
|
-
|
|
25
|
-
# Optional: custom Experience Edge hostname for media URL rewriting (e.g. staging).
|
|
26
|
-
SITECORE_EXPERIENCE_EDGE_HOSTNAME=
|
|
27
|
-
|
|
28
|
-
# An optional Sitecore Personalize scope identifier.
|
|
29
|
-
# This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
|
|
30
|
-
# This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
|
|
31
|
-
NEXT_PUBLIC_PERSONALIZE_SCOPE=
|
|
32
|
-
|
|
33
|
-
# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
|
|
34
|
-
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=
|
|
35
|
-
|
|
36
|
-
# Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400.
|
|
37
|
-
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT=
|
|
38
|
-
|
|
39
|
-
# Sitecore Content SDK npm packages utilize the debug module for debug logging.
|
|
40
|
-
# https://www.npmjs.com/package/debug
|
|
41
|
-
# Set the DEBUG environment variable to 'content-sdk:*' to see all logs:
|
|
42
|
-
#DEBUG=content-sdk:*
|
|
43
|
-
# Or be selective and show for example only layout service logs:
|
|
44
|
-
#DEBUG=content-sdk:layout
|
|
45
|
-
# Or everything BUT layout service logs:
|
|
46
|
-
#DEBUG=content-sdk:*,-content-sdk:layout
|
|
47
|
-
|
|
48
|
-
# Client ID, Secret and Rendering Host Name used for Design Library functionality
|
|
49
|
-
SITECORE_AUTH_CLIENT_ID=
|
|
50
|
-
SITECORE_AUTH_CLIENT_SECRET=
|
|
51
|
-
SITECORE_RENDERINGHOST_NAME=
|
|
1
|
+
# This file should be copied to .env.local and modified with your environment variables to connect to your remote Sitecore instance.
|
|
2
|
+
|
|
3
|
+
# To secure the Sitecore editor endpoint exposed by your Next.js app
|
|
4
|
+
# (`/api/editing/render` by default), a secret token is used. This (client-side)
|
|
5
|
+
SITECORE_EDITING_SECRET=
|
|
6
|
+
|
|
7
|
+
# Your Sitecore site name.
|
|
8
|
+
# The value of the variable represents the default/configured site.
|
|
9
|
+
NEXT_PUBLIC_DEFAULT_SITE_NAME=
|
|
10
|
+
|
|
11
|
+
# Your default app language.
|
|
12
|
+
NEXT_PUBLIC_DEFAULT_LANGUAGE=
|
|
13
|
+
|
|
14
|
+
# Your unified Sitecore Edge Context Id for server-side use.
|
|
15
|
+
# This will be used over any Sitecore Preview / Delivery Edge variables (above).
|
|
16
|
+
SITECORE_EDGE_CONTEXT_ID=
|
|
17
|
+
|
|
18
|
+
# Your Sitecore Edge Context Id for client-side use.
|
|
19
|
+
# Will be used as a fallback if separate SITECORE_EDGE_CONTEXT_ID value is not provided
|
|
20
|
+
NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID=
|
|
21
|
+
|
|
22
|
+
# Optional: custom Sitecore Edge Platform hostname (hostname or full URL).
|
|
23
|
+
NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME=
|
|
24
|
+
|
|
25
|
+
# Optional: custom Experience Edge hostname for media URL rewriting (e.g. staging).
|
|
26
|
+
SITECORE_EXPERIENCE_EDGE_HOSTNAME=
|
|
27
|
+
|
|
28
|
+
# An optional Sitecore Personalize scope identifier.
|
|
29
|
+
# This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
|
|
30
|
+
# This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
|
|
31
|
+
NEXT_PUBLIC_PERSONALIZE_SCOPE=
|
|
32
|
+
|
|
33
|
+
# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
|
|
34
|
+
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=
|
|
35
|
+
|
|
36
|
+
# Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400.
|
|
37
|
+
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT=
|
|
38
|
+
|
|
39
|
+
# Sitecore Content SDK npm packages utilize the debug module for debug logging.
|
|
40
|
+
# https://www.npmjs.com/package/debug
|
|
41
|
+
# Set the DEBUG environment variable to 'content-sdk:*' to see all logs:
|
|
42
|
+
#DEBUG=content-sdk:*
|
|
43
|
+
# Or be selective and show for example only layout service logs:
|
|
44
|
+
#DEBUG=content-sdk:layout
|
|
45
|
+
# Or everything BUT layout service logs:
|
|
46
|
+
#DEBUG=content-sdk:*,-content-sdk:layout
|
|
47
|
+
|
|
48
|
+
# Client ID, Secret and Rendering Host Name used for Design Library functionality
|
|
49
|
+
SITECORE_AUTH_CLIENT_ID=
|
|
50
|
+
SITECORE_AUTH_CLIENT_SECRET=
|
|
51
|
+
SITECORE_RENDERINGHOST_NAME=
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Line endings for this repository
|
|
2
|
-
# See: https://help.github.com/en/articles/configuring-git-to-handle-line-endings
|
|
3
|
-
# This should line up with the expectations from .eslintrc
|
|
4
|
-
|
|
5
|
-
# Set the default behavior, in case people don't have core.autocrlf set.
|
|
6
|
-
* text=crlf
|
|
7
|
-
|
|
8
|
-
# Declare files that will always have CRLF line endings on checkout.
|
|
9
|
-
*.ts text eol=crlf
|
|
10
|
-
*.tsx text eol=crlf
|
|
11
|
-
*.js text eol=crlf
|
|
1
|
+
# Line endings for this repository
|
|
2
|
+
# See: https://help.github.com/en/articles/configuring-git-to-handle-line-endings
|
|
3
|
+
# This should line up with the expectations from .eslintrc
|
|
4
|
+
|
|
5
|
+
# Set the default behavior, in case people don't have core.autocrlf set.
|
|
6
|
+
* text=crlf
|
|
7
|
+
|
|
8
|
+
# Declare files that will always have CRLF line endings on checkout.
|
|
9
|
+
*.ts text eol=crlf
|
|
10
|
+
*.tsx text eol=crlf
|
|
11
|
+
*.js text eol=crlf
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"endOfLine": "crlf",
|
|
3
|
-
"semi": true,
|
|
4
|
-
"singleQuote": true,
|
|
5
|
-
"tabWidth": 2,
|
|
6
|
-
"trailingComma": "es5",
|
|
7
|
-
"printWidth": 100
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"endOfLine": "crlf",
|
|
3
|
+
"semi": true,
|
|
4
|
+
"singleQuote": true,
|
|
5
|
+
"tabWidth": 2,
|
|
6
|
+
"trailingComma": "es5",
|
|
7
|
+
"printWidth": 100
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"recommendations": [
|
|
3
|
-
"GraphQL.vscode-graphql",
|
|
4
|
-
"dbaeumer.vscode-eslint",
|
|
5
|
-
"esbenp.prettier-vscode",
|
|
6
|
-
"mikestead.dotenv",
|
|
7
|
-
]
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
"GraphQL.vscode-graphql",
|
|
4
|
+
"dbaeumer.vscode-eslint",
|
|
5
|
+
"esbenp.prettier-vscode",
|
|
6
|
+
"mikestead.dotenv",
|
|
7
|
+
]
|
|
8
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Attach to Process",
|
|
9
|
-
"type": "node",
|
|
10
|
-
"request": "attach",
|
|
11
|
-
"skipFiles": ["<node_internals>/**"],
|
|
12
|
-
"port": 9229
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Attach to Process",
|
|
9
|
+
"type": "node",
|
|
10
|
+
"request": "attach",
|
|
11
|
+
"skipFiles": ["<node_internals>/**"],
|
|
12
|
+
"port": 9229
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|