sanity-plugin-media 6.4.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.js +214 -164
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -226,6 +226,9 @@ When `locales` are provided, all localized fields (title, altText, description,
|
|
|
226
226
|
|
|
227
227
|
This will return the Italian value if present, otherwise English, otherwise French, etc. Adjust the order as needed for your project.
|
|
228
228
|
|
|
229
|
+
**Sorting by title:**
|
|
230
|
+
When `locales` are configured, "Title: A to Z" / "Title: Z to A" in the sort dropdown sort by the first available translation, checked in the order your `locales` array is declared — the same fallback pattern shown above. Assets missing a title in every configured locale sort as empty.
|
|
231
|
+
|
|
229
232
|
#### Migrating existing assets to localized format
|
|
230
233
|
|
|
231
234
|
If you enable `locales` on a project that already has assets with plain string fields (e.g. `title: "My photo"`), you should run the provided migration script to convert those fields to the localized object format (e.g. `title: {en: "My photo"}`).
|