sanity-io / sanity-template-gatsby-portfolio

A Gatsby portfolio site powered by Sanity for https://www.sanity.io/create
https://www.sanity.io/create/?template=sanity-io%2Fsanity-template-gatsby-portfolio
69 stars 18 forks source link

Open Preview extension/Content Sync #65

Closed kathmbeck closed 2 years ago

kathmbeck commented 2 years ago

Purpose:

Adding Open Preview button to gatsby portfolio starter. The button is now located in the document actions menu in studio, and applies to all content types. As part of this PR, we are following the steps for manually setting up the button on pre existing sites:

https://www.notion.so/gatsbyjs/Gatsby-Open-Preview-Sanity-46fdf6b7b8e343ffaf5306bcba73375b

Technical details:

We are utilizing the document actions extension to add a new action from https://www.npmjs.com/package/sanity-plugin-gatsby-cloud-preview. The action will redirect folks to a new tab with a content sync url configured to redirect them to a preview of the page they are editing. We have bumped the version of gatsby-source-sanity that utilizes the new PINC builds and content sync functionality.