- Developer guides
The Sitecore configuration file
Content SDK's Angular implementation includes the sitecore.config.ts file, which is the central configuration point for your app, found in the app's root folder.
To access any value from the configuration file, you can import it into your code as shown in the following example:
Several of the properties described in this topic have a corresponding environment variable; where they do, that variable is listed here alongside the property's description. If a property is not given an explicit value, it will take the value from the corresponding environment variable where available. If a value is not defined in either place, the property will use a default value instead.
The base configuration
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Defines the data source for layout and content requests. | N/A |
|
| The default Sitecore site name used for content resolution. |
|
|
| The fallback language used when no locale is specified. Populated from environment if unset. Defaults to |
|
|
| Editing secret required by SitecoreAI editing and preview functionality. Provide this if you want to use your local or deployed application as an editing host. |
|
api properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Edge endpoint credentials used to connect to an instance of SitecoreAI. | N/A |
|
| API endpoint credentials used to connect to a local instance of SitecoreAI running in a Docker container. | N/A |
edge properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| The unique identifier used to connect to and retrieve data from your SitecoreAI instance. |
|
|
| Identifier used to connect to and retrieve data from your SitecoreAI instance in client-side operations. |
|
|
| URL of the SitecoreAI endpoint that your Content SDK app will communicate with. Default: https://edge-platform.sitecorecloud.io |
|
local properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Your Sitecore API key used to connect to the GraphQL endpoint. |
|
|
| Sitecore API hostname that your app will connect to and retrieve data from. |
|
|
| A GraphQL endpoint path that will be appended to | N/A |
Services configuration
These settings provide additional configuration for various Content SDK services.
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Extra settings for the layout service. | N/A |
|
| Extra settings for the dictionary service. | N/A |
|
| Controls GraphQL request retry behavior. | N/A |
layout properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Custom function to format the layout service query string. Accepts | N/A |
dictionary properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Configuration for local memory caching of dictionary service requests. | N/A |
caching properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether local memory caching is used for the dictionary service. | N/A |
|
| The length of time, in seconds, to keep cached entries in local memory. | N/A |
retries properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| The maximum number of retries attempted by the GraphQL client if the first one fails. Set this to 0 if you don't want to use retries. | N/A |
|
| Custom retry strategy implementation for the GraphQL client. | N/A |
Extra middleware and other configurations
These settings configure functionality that is provided by middleware.
redirects
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether SXA redirect processing is enabled. | N/A |
In Content SDK for Angular, the locales property is not configurable under redirects. Redirect locale awareness is derived automatically from angular.locales at resolve time.
multisite
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether the multisite resolution is enabled. | N/A |
|
| Custom function to determine whether cookie-based site resolution should be used for a given request. | N/A |
personalize
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether the personalize feature is enabled. | N/A |
|
| The timeout duration, in seconds, for personalization requests to Experience Edge. |
|
|
| The timeout duration, in seconds, for personalization requests to Sitecore CDP. |
|
|
| The Sitecore Personalize scope identifier, which allows you to isolate your personalization data between SitecoreAI environments. |
|
|
| The CDP channel to use for events. | N/A |
|
| The currency type to use for CDP requests. | N/A |
other properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether media URLs pointing to the production Experience Edge host are rewritten. Setting it to true rewrites media URLs using the custom host defined in You can also use a function in the format | N/A |
Angular properties
These are Angular-specific configuration options.
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| List of URL segment locales supported by your application. Used for locale-aware routing and dictionary loading. The | N/A |
|
| Configuration options for loaders cache. | N/A |
|
| Configuration options for link prefetch on | N/A |
loaderCache properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| Whether the loaders cache layer is enabled or not. Default: true | N/A |
|
| Time-to-live (TTL) in seconds for cache entries before they become stale. Default: 300 | N/A |
linkPrefetch properties
Property | Type | Description | Corresponding environment variable |
|---|---|---|---|
|
| The prefetch strategy applied to Default: 'eager' | N/A |
|
| Hover dwell time, in milliseconds, before prefetch fires. Only used when Default: 100 | N/A |