Note: The Release Preview app in Marketplace is now deprecated and no longer supported. We encourage you to use the Contentstack Timeline feature.
The Release Preview app displays the release date and time in a calendar format. It also shows other release details, such as entries or assets that are added to a release with their specific titles, content types, and versions within your Contentstack environment. With the Release Preview app, you can preview your website prior to a scheduled release and compare the changes scheduled for your stack in the upcoming releases.
Contentstack Marketplace lets you integrate the Release Preview app directly into your headless CMS. You can easily use this app to view the upcoming releases of your stack. It displays all scheduled and unscheduled releases to preview the release dates and their scheduled timings on the Release Preview app calendar. It also includes a timeline view of all releases that shows newly added, updated, and deleted entries and assets.
This step-by-step guide explains how to configure and use the Release Preview app within your stack.
Follow the steps below to install the Release Preview app in Contentstack.



Note: No additional configuration is required to use the Release Preview app.
To use the Release Preview application in your stack, follow the steps given below:



Select the environment(s), then select Later, choose the release date and time, and then click the Deploy button.

Note: If the release date is not confirmed, you can use the Release Preview app to quickly set a tentative date and time.
The release is now locked. You cannot add, update or delete any entry or asset from the locked release.Note: Release Preview is a Full Page Location app. For more information, refer to the Full Page Location documentation.

Also, all the scheduled publishing events will be displayed in the calendar.
By default, the format to view the Release Preview Calendar is set to Month.
You can click the top-right dropdown in the Release Preview app and select the Week option to view the calendar in the week format.


To preview the website, you must configure the Base URL and select the corresponding Language in the Environment settings of your stack.


Note: The timeline shows the releases according to their scheduled publish dates.
Upcoming releases are filtered using the following filters:


The Locked releases are represented with a dark gray lock icon, the Soft-locked releases are represented with a light gray lock icon, and the Unscheduled releases are represented with a light gray open lock icon.

Note: You can modify only the soft-locked and unscheduled releases and not the locked ones.


Note: For locked releases, the Change Date button is hidden.

Click the Highlight Differences button to view the modified content.
You can compare and view the releases in responsive mode. Select a view option from the dropdown list to view the screen in different sizes and orientations. By default, it is set to Responsive.

Note: In the Responsive view option, you can customize the width and height of the screen. For the Desktop, Tablet, and Mobile view options, the dimensions have already been set in the Release Preview app.
In the right-hand side of the panel, you can see the Rotate Screen icon. It switches the screen from portrait to landscape mode and vice versa.


Note: The compare feature does not support the Assets Item Type.

You have a detailed step-by-step guide on how to set up Release Preview for your stack using two set up methods:
Note: The JavaScript Delivery SDK supports plugins like the Release Preview Plugin from version 3.16.0.
<script src="https://unpkg.com/@contentstack/delivery-plugin-release-preview/dist/index.js"></script>
npm install @contentstack/delivery-plugin-release-preview
// utils.ts
export const getReleasePreviewSession = (searchParams: URLSearchParams) => {
const release_session_key = 'release_preview_session';
const tentativeReleases = searchParams.get('tentativeReleases');
const release_id = searchParams.get('release_preview_id');
const params = {
enabled: true,
release_id,
tentativeReleases: tentativeReleases && JSON.parse(decodeURIComponent(tentativeReleases)),
}
const releaseSessionInfo = sessionStorage.getItem(release_session_key);
if(release_id || !releaseSessionInfo) {
sessionStorage.setItem(release_session_key, JSON.stringify(params));
return params;
}
return JSON.parse(releaseSessionInfo);
}
// sdk.ts
import * as contentstack from "contentstack";
import { releaseReplaceAlgorithm, releaseReplacePreReq } from "@contentstack/delivery-plugin-release-preview";
class ReleasePreviewPlugin {
onRequest (stack, request) {
releaseReplacePreReq(stack, request);
return request;
}
async onResponse(stack, request, response, data) {
const _data = data['entries'] || data['assets'] || data['entry'] || data['asset'];
await releaseReplaceAlgorithm(_data, stack);
return data
}
}
export const stack = contentstack.Stack({
/* YOUR CONFIG HERE */,
live_preview: {
/* YOUR LIVE PREVIEW CONFIG HERE */
/* NOTE: Release preview also relies on this config to work */
},
plugins: [
new ReleasePreviewPlugin()
]
});
// App.tsx
import ReleasePreview from "@contentstack/delivery-plugin-release-preview";
import { useSearchParams } from "react-router-dom";
import { stack } from "./sdk";
import { getReleasePreviewSession } from "./utils";
function App() {
const [isLoading, setLoading] = useState(true);
const [searchParams] = useSearchParams();
useEffect(() => {
(async () => {
const release_preview_options = getReleasePreviewSession(searchParams);
/* stack here is the created Contentstack Stack Instance */
await ReleasePreview.init(stack, release_preview_options);
setLoading(false);
})()
}, []);
return (isLoading ? null : /*YOUR COMPONENT HERE*/)
}
npm install @contentstack/delivery-plugin-release-preview
// utils.js
const release_session_key = 'release_preview_session';
export const getReleasePreviewSession = (req, res) => {
const searchParams = req.query;
const tentativeReleases = searchParams['tentativeReleases'];
const release_id = searchParams['release_preview_id'];
const params = {
enabled: true,
release_id,
tentativeReleases: tentativeReleases && JSON.parse(decodeURIComponent(tentativeReleases)),
}
const releaseSessionInfo = req.session[release_session_key];
if(release_id || !releaseSessionInfo) {
req.session[release_session_key] = JSON.stringify(params);
return params;
}
return JSON.parse(releaseSessionInfo);
}
// sdk.js
const contentstack = require("contentstack");
const { releaseReplaceAlgorithm, releaseReplacePreReq } = require("@contentstack/delivery-plugin-release-preview");
class ReleasePreviewPlugin {
onRequest (stack, request) {
releaseReplacePreReq(stack, request);
return request;
}
async onResponse(stack, request, response, data) {
const _data = data['entries'] || data['assets'] || data['entry'] || data['asset'];
await releaseReplaceAlgorithm(_data, stack);
return data
}
}
export const stack = contentstack.Stack({
/* YOUR CONFIG HERE */,
live_preview: {
/* YOUR LIVE PREVIEW CONFIG HERE */
/* NOTE: Release preview also relies on this config to work */
},
plugins: [
new ReleasePreviewPlugin()
]
});
Note: If you are using Live Preview 2.0, you need to pass the Management token in your Live Preview configuration.
// app.js
const { default: ReleasePreview } = require('@contentstack/delivery-plugin-release-preview');
const { stack } = require('./sdk');
const { getReleasePreviewSession } = require('./utils');
app.use(async (req, res, next) => {
try {
const release_preview_options = getReleasePreviewSession(req, res)
await ReleasePreview.init(stack, release_preview_options);
} catch(err) {
console.error('error while setting release preview', err);
}
next();
})
import '@contentstack/delivery-plugin-release-preview/dist/compareUtils.browser.min.js'
import '@contentstack/delivery-plugin-release-preview/dist/compareUtilsStyle.css'
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@contentstack/delivery-plugin-release-preview/dist/compareUtilsStyle.css" />
<script src="https://cdn.jsdelivr.net/npm/@contentstack/delivery-plugin-release-preview/dist/compareUtils.browser.min.js"></script>
Note: You can use the Release Preview SDK plugin to preview and compare your website. Release preview compare relies on Live Preview edit tags to work.