Configuration
You can configure the Sanity integration by adding the following properties to the sanity
object in the middleware.config.js
file:
module.exports = {
integrations: {
sanity: {
location: '@vsf-enterprise/sanity-api/server',
configuration: {
projectId: 'SANITY_PROJECT_ID',
dataset: 'SANITY_DATASET',
apiVersion: 'SANITY_API_VERSION',
token: 'SANITY_STUDIO_TOKEN',
useCdn: true | false,
},
},
},
};
Configuration Options
You can configure the Contentful integration by adding the following properties to the sanity
object in the middleware.config.js
file:
projectId
- Sanity project ID,dataset
- Sanity dataset,apiVersion
- (Optional) use current date (YYYY-MM-DD) to target the latest API version,token
- (Optional) Only if you want to update content with the Sanity Studio client,useCdn
- (Optional) set totrue
to fetch from edge cache.