Adjust your app for Web Spotlight
What does your web app need to do to display interactive pages in Web Spotlight? Review a short checklist with code samples to see if your app is ready.
Check 1. Content preview
Use Delivery SDK in your app to preview content. We recommend using environment variables to avoid storing sensitive information directly in your code, such as your environment ID and API key. For example, this is how you can set up a client for Delivery API to preview content.Check 2: Displaying a content item
Once your app can retrieve content items, it’s time to display their content. For example, this is how you can map your landing page elements to HTML elements.Check 3: Smart Link SDK
To enable in-context editing in Web Spotlight, use the Kontent.ai Smart Link SDK in your app. Make sure to initialize the SDKdata-kontent-item-id
and data-kontent-element-codename
data attributes to add smart links for specific content elements.
Check 4: App deployment
For Web Spotlight to work correctly, your app must be deployed and accessible via a public URL. You can use many different services to deploy your app, such as Microsoft Azure, Amazon AWS, Vercel, Netlify, or Surge.sh.Combined with the content preview, it’s crucial that your web app keeps the sensitive information on the server side and doesn’t reveal it on the client side.