Define a Blueprint to manage Sanity resources
defineBlueprint({ resources: [ defineCorsOrigin({ name: 'localhost-origin', origin: 'http://localhost:3333', }), defineDocumentFunction({ name: 'update-search-index', event: { on: ['create', 'update'], filter: "_type == 'post'", projection: "{_id, title, slug}", }, }), ],}) Copy
defineBlueprint({ resources: [ defineCorsOrigin({ name: 'localhost-origin', origin: 'http://localhost:3333', }), defineDocumentFunction({ name: 'update-search-index', event: { on: ['create', 'update'], filter: "_type == 'post'", projection: "{_id, title, slug}", }, }), ],})
The blueprint configuration
A blueprint module
Define a Blueprint to manage Sanity resources