Skip Navigation

Preview Mode Test Page

Current Status

Preview Mode: ✗ Inactive

Cookie Value: Not set

Cookie Details

sanity-preview cookie:

{
  "name": "sanity-preview",
  "value": "not set",
  "exists": false
}

Environment Variables

SANITY_API_READ_TOKEN: ✗ Not set

SANITY_PREVIEW_SECRET: ✗ Not set (using default)

PUBLIC_SANITY_VISUAL_EDITING_ENABLED: false

Test Links

Enable Preview (default secret):

/api/preview?secret=preview-secret-token

Enable Preview (custom secret from .env):

/api/preview?secret=YOUR_SECRET

Exit Preview:

/api/exit-preview

💡 Troubleshooting Tips:

  • Check the browser console for debug logs
  • Make sure you have a .env file with SANITY_API_READ_TOKEN
  • Restart the dev server after creating .env
  • Check that cookies are enabled in your browser
  • Try in an incognito window to rule out cookie issues