Upgrade the Command Line Interface (CLI) with
npm install --global @sanity/cli
Upgrade the Content Studio with:
sanity upgrade
✨ Highlights
🎰 Reconfiguring studios
You can now easily reconfigure an existing Sanity studio project to use a different project ID and dataset, by running sanity init
in an existing studio folder. This will take you through a reconfiguration process and update the sanity.json
file.
You can also ship a "template" for a studio by leaving out the projectId
and dataset
configuration options in sanity.json
- when a user runs sanity init
or sanity start
in a studio without these options set, it will take them through the creation or selection of a project and dataset.
⚖️ Improved studio search and experimental search config
This release introduces a way to define specific weights on fields/paths for document types.
Since the API is not stable yet, and likely subject to change, it's confgurable on the __experimental_search
property for schema document types. Here's an example:
type: 'document',
name: 'author',
fields: [
{name: 'name', type: 'string'},
// ...
],
__experimental_search: [
{weight: 1.2, path: 'name'}
]
// ...
A few things to note:
- The weight is a global multiplier across all document types, so if
name
on typecustomer
has a weight of2
, andname
on typeauthor
has a weight of4
, documents of typeauthor
will be ranked higher than documents of typecustomer
, even if theirname
fields equally matches what the user searched for. - If no search config is specified on a document type, it gets derived from the preview config (which again is derived by default through schema introspection).
- We have also united the reference search with the global search, so that they both follow the same ranking/weighting rules.
📓 Full changelog
Author | Message | Commit |
---|---|---|
Espen Hovlandsdal | [schema] Add missing fields to span type (#1154) | 5dd5371 |
Kristoffer J. Sivertsen | [language-filter] Reference element outside of poppable (#1158) | cd08bf7 |
Kristoffer J. Sivertsen | [components] Add truncate prop to validationlist and item (#1132) | 287fdc1 |
Kristoffer J. Sivertsen | [components] Auto-collapse animation smoothness (#1150) | 6284fa1 |
Espen Hovlandsdal | [core] Improve dataset name validation (#1162) | 1c3aef4 |
Espen Hovlandsdal | [cli] Allow reconfiguring studio projects (#1163) | 26d5913 |
Kristoffer J. Sivertsen | [default-layout] Show first letter in name as fallback (#1167) | 124a4fe |
Bjørge Næss | [default-layout] Give the search hit container a max height of 80vh in order to fit more items (#1166) | 7dbc0eb |
Bjørge Næss | [base] Experimental search config with weights (#1168) | a6f3caf |