OG image generator asset source
Allow editors to generate images on the fly inside of Sanity 🔥
Go to OG image generator asset sourceSpeed up your Sanity.io development with snippets tailored for building schemas, queries and desk structures ✨
A set of useful snippets to speed up your Sanity.io development. I've been using some of these snippets for 2.5 years now, and they drastically increase my capacity to deliver fast and precisely, hope you enjoy 😊
Every snippets starts with either sanity(...)
or groq(...)
, so you know they won't collide with your other snippets. They are enabled for Javascript & Typescript files, reach out if you need to enable them for other extensions.
sanitySchema
): Create a simple schema for the CMS (document, object or image)sanityFld
): Add a field to a sanity object / documentsanityDesc
): Add a custom description to a field, document or objectsanityOptional
): Add a cue that a field is optionalsanityOptionalEncouraged
): Add a cue that a field is optional, but encourage writing itsanityTip
): Add a tip as a field's descriptionsanityFieldset
): Add fieldsets to a sanity object / documentsanityCollapse
): Make a given object field collapsible to help editors scroll less through the documentsanityRequired
): Make a given field requiredsanityArrValidation
): Validate an array field based on its lengthsanityArrFld
): Create a basic array field in SanitysanityObjFld
): Create a basic object field in SanitysanityRefFld
): Create a basic reference field in SanitysanityPreviewSelect
): Add a basic preview with selection object in SanitysanityPreviewSelectPrepare
): Add a preview with selection object and prepare function in SanitysanitySelect
): Add a basic selection object for preview in SanitysanityPrepare
): Add a prepare function for preview in SanitygroqDraftConstraint
): Constraint for groq queries to prevent or limit to drafted documentssanityViewComponent
): Add a view to a document with a React componentsanityDocList
): Adds a listItem in your desk structure for custom document list. Perfect for filtering by document values or adding docs from multiple typesFeel free to contribute your snippets!
Your feedback is very much appreciated as long as it's respectful and inclusive :)
Allow editors to generate images on the fly inside of Sanity 🔥
Go to OG image generator asset sourceBulk upload documents to Sanity's database right from the studio
Go to JSON bulk upload desk toolImport Sanity data right into Metalsmith.
Go to Metalsmith to Sanity