LivePreviewConfig

View as Markdown

LivePreviewConfig

LivePreviewConfig holds the live preview settings of a client, in the Contentstack.Core.Configuration namespace. With live preview on, entry fetches and queries return the draft content that an editor previews, in place of the published content. Use this class to

  • turn live preview on for a client
  • give the client the preview token or management token that preview requests need
  • preview a release, or content at a point in time

Assign the object to ContentstackOptions.LivePreview, then create the client. Read it back later with the GetLivePreviewConfig method.

NameTypeDescription
Enable bool

Turns live preview on for the client.

PreviewToken string

Preview token. Sent as the preview_token header.

ManagementToken string

Management token. Sent as the authorization header, and used in place of PreviewToken.

Host string

Live preview host, without a scheme. The constructor fills it when empty.

ReleaseId string

Release to preview. Sent as the release_id header.

PreviewTimestamp string

Point in time to preview. Sent as the preview_timestamp header.