Upgrade the Command Line Interface (CLI) with
npm install --global @sanity/cli
Upgrade the Content Studio with:
sanity upgrade
✨ Highlights
Environment variable support
A much requested feature - the Sanity Studio now allows configuration of key parameters such as the project ID and dataset through environment variables, both in development and for deployment. This should make it much easier to integrate it into continuous deployment workflows.
In addition, we now inject environment variables with the SANITY_STUDIO_
prefix into the build process, allowing you to use them when customizing the Sanity Studio.
Read more about this feature in our documentation.
Template for custom asset source plugins
With the recently launched support for pluggable asset sources, we've had a lot of fun seeing what people build with it. In this release of the CLI, we've included a plugin template for building an asset source. You can now do sanity init plugin
in your studio folder and choose the "Custom asset source plugin" option to get the boilerplate code up and running.
🐛 Notable bugfixes
- Fixed the experimental Action UI affordances not being respected
- Fixed image and file fields not validating their
fields
property
📓 Full changelog
Author | Message | Commit |
---|---|---|
Victoria Bergquist | [cli] add template for custom asset source plugin (#1639) | ae4de9b |
Espen Hovlandsdal | [cli] Reject template download if statusCode is not 2xx (#1638) | 6c9d0a9 |
Espen Hovlandsdal | [structure] Try to infer schema type from filter in document lists (#1634) | daae65f |
Espen Hovlandsdal | [schema] Validate file, image schema fields | ea6825e |
Espen Hovlandsdal | [schema] Pass correct index to field visitor | 03e77e9 |
Espen Hovlandsdal | [server] Fix potential crash when attempting to normalize module path (#1635) | a7fb020 |
Espen Hovlandsdal | [desk-tool] Resolve document type from template if available (#1633) | adf1fbb |
Espen Hovlandsdal | [structure] Check if "create"-action is enabled before infering templates | 318d3c5 |
Espen Hovlandsdal | [desk-tool] Only show publish button if action is enabled | 85a5ea8 |
Espen Hovlandsdal | [desk-tool] Disable publishing when action is disabled | 4351fb9 |
Espen Hovlandsdal | [desk-tool] Set form as read-only on new document with create action disabled | 2640b60 |
Espen Hovlandsdal | [desk-tool] Use noop onChange handler if in readonly mode | 63c1c40 |
Espen Hovlandsdal | [desk-tool] Add missing setPayload method to pane router context (#1645)
| b283b1c |
Bjørge Næss | [chore] Upgrade TypeScript + eslint tooling (#1650) | a34fcbe |
Espen Hovlandsdal | [webpack-integration] Expose SANITY_STUDIO_* environment variables | 1ca6c46 |
Espen Hovlandsdal | [util] Allow setting projectId/dataset through environment variables | 32f062f |
Espen Hovlandsdal | [chore] Pass studio path when reducing configuration | da11acf |
Espen Hovlandsdal | [util] Try reading project ID/dataset from .env files | b554f9e |
Espen Hovlandsdal | [core] Read .env files when running sanity exec
| 4cd838d |
Espen Hovlandsdal | [webpack-integration] Include SANITY_STUDIO env vars from .env files | 0ac8711 |
Espen Hovlandsdal | [chore] Pass through env based on command when determining .env-file | b2dea43 |
Espen Hovlandsdal | [webpack-integration] Expose getSanityEnvVars()
| 8e71dad |
Espen Hovlandsdal | [core] List environment variables used when building static bundle | 115a770 |
Espen Hovlandsdal | [util] Use SANITY_STUDIO_API/SANITY_STUDIO_PROJECT namespaces | ce4a2fd |
Espen Hovlandsdal | [all] Rename internal environment variable name | aec5667 |
Espen Hovlandsdal | [core] Respect SANITY_ACTIVE_ENV when reading env files | cf711af |
Espen Hovlandsdal | [structure] Allow setting options on component, component view | f51b799 |
Espen Hovlandsdal | [desk-tool] Pass on user-defined options to component panes/views | 147802f |
Espen Hovlandsdal | [structure] Use referential identity when comparing immutability | 0baed49 |
Espen Hovlandsdal | [util] Types: Fix method declaration for path get() method | 79d4824 |
Espen Hovlandsdal | [form-builder] Pass parent object to slug source function | 63bdc12 |
Espen Hovlandsdal | [test-studio] Simplify experiment slug schema | a0f2866 |
Espen Hovlandsdal | [structure] Allow specifying a default document node resolver (#1637) | 6eb4406 |
Marius Lundgård | [components] Fix tabs overflow issue | 2a3b4b0 |