Content Environment Variables
You can set the PACK_CONTENT_ENVIRONMENT
and PUBLIC_PACK_CONTENT_ENVIRONMENT
(both are required) environment variables to force the storefront to use a specific content environment outside of the Customizer, e.g. for a specific Github branch.
Preview Provider
in <PreviewProvider/>
pass the contentEnvironment
with the content environment handle you want to use.
<CartProvider>
<ContextsProvider>
<PreviewProvider
customizerMeta={customizerMeta}
isPreviewModeEnabled={isPreviewModeEnabled}
siteSettings={siteSettings}
contentEnvironment={ENV.PUBLIC_PACK_CONTENT_ENVIRONMENT}
>
<Layout key={`${locale.language}-${locale.country}`}>
{children}
</Layout>
</PreviewProvider>
</ContextsProvider>
</CartProvider>
Resources
Content Environments
Learn how to create and manage different versions of your content