How the toolkit configures the Sanity studio
Sanity is extremely flexible, but configuring it from scratch can be a challenge. We draw on 5 years of using it to set-up several starting points to speed up you development:
- Use the sanity-plugin-media (opens in a new tab) by default for easier asset management
- See the
form
property inapp/sanity/sanity.config.ts
- See the
- Only enable the Vision plugin (opens in a new tab) during development. It's used for testing & running queries.
- See the
plugins
array inapp/sanity/sanity.config.ts
- See the
- Backlinks as custom views in the document editor
- Document types can be configured to display their backlinks through the
custom.backlinks
array in their schemas - This is provided by
@tinloof/sanity-toolkit
'sresolveDocumentNode
function, which we call ingetDefaultDocumentNode
inapp/sanity/deskStructure.ts
- Document types can be configured to display their backlinks through the
- Helpers for the A/B testing feature - refer to docs on A/B testing
- Localization helpers - refer to docs on localization
- Embedding of the studio inside of the Remix app (under the
/manage
route)- We don't include Remix's
<Links />
in this route to prevent including the front-end CSS styles into the studio, slightly improving performance
- We don't include Remix's
- Several battle-tested schemas, like the
link
,cta
,seo
,publishStatus
, etc. - A basic implementation of the sharing image generator
💡
You're of course, welcome and expected to change these defaults to suit your needs. We've tried to make it as easy as possible to do so.