Pricing

Product Updates

DatoCMS changelog for new features and general improvements
NewUI Improvement
More fine grained controls on publishing/unpublishing of linked records
May 6th, 2021

It's no doubt that having a strongly linked content schema helps you find the information you need, when you need it. But what happens when we attempt to (un)publish or delete interconnected resources?

Most CMSs are terrible at handling this sort of thing. Contentful for example simply leaves a ghost references to a records that no longer exists, and calls it a day. Their philosophy seems to be "users will take care of filtering this garbage somehow on the frontend, not our problem!".

What distinguishes us the most from competition is a greater care in keeping the saved contents coherent and always consistent. It is our problem to ensure that, not yours. You've better things to do.

Today, we're happy to introduce additional settings that allow you to specify exactly what behavior to adopt when such events occur. And since different settings may make sense depending on the specific context, you can specify different behaviours for every Link, Links and Structured Text in your project.

If you have ever worked with databases, you will surely notice a similarity with the DELETE CASCADE settings that you can set on the foreign keys of a table:

With this change, editors won't have to guess the right pattern to solve intricate cases of dependencies between records, since the developers have already taken care of that for them. And scheduled publish/unpublish operations will be much more secure and deterministic than before.

The default settings you'll find in the existing fields are the ones that were in place until now, so don't worry, nothing will change unless you decide to do so.

If you want to massively change these settings, you can conveniently do so via the Content Management API and migrations.

In this example, we're changing settings for every Link, Links and Structured field in a project, so that when a publishing is requested and a field references some unpublished records, the resolution strategy is to also publish the referenced records:

module.exports = async (client) => {
const itemTypes = await client.itemTypes.all();
for (const itemType of itemTypes) {
const fields = await client.fields.all(itemType.id);
const interestingFields = fields.filter((f) =>
['link', 'links', 'structured_text'].includes(f.fieldType),
);
for (const field of interestingFields) {
const validatorFor =
field.fieldType === 'link'
? 'itemItemType'
: field.fieldType === 'links'
? 'itemsItemType'
: 'structuredTextLinks';
if (
field.validators[validatorFor]
.onPublishWithUnpublishedReferencesStrategy !== 'publish_references'
) {
await client.fields.update(field.id, {
validators: {
...field.validators,
[validatorFor]: {
...field.validators[validatorFor],
onPublishWithUnpublishedReferencesStrategy:
'publish_references',
},
},
});
}
}
}
};
API Clients
Importer from Contentful supports rich-text/structured text
April 30th, 2021

From version 3.4.5 of our JS client we've improved the importer from Contentful!

We've added support for importing rich-text fields from Contentful to our new structured text field.

Before we couldn't import properly these fields, but now they map nicely to our new field, so the imports should be more straightforward.

For any issues or problem with imports, please reach out at support@datocms.com as we can help with any issues doing the import phase, thank you!

Content Delivery APIContent Management API
New filter "isBlank" for text fields
April 12th, 2021

To work around an ambiguity with empty text fields, especially with structured text fields, we have added a new isBlank filter for single-line text, multi-line text and structured text fields.

You can have a look at the details in the documentation page, for example on the structured text.

New
Better support for WebP and HEIC formats
March 23rd, 2021

We have added full support to WebP and HEIC formats in our media area.

Before these assets didn't have the same features as the other images, but now they do. So you can just drag-and-drop them as any other image, see previews and have the same support for responsive images on the GraphQL API.

If you have existing WebP and HEIC images you need to reupload them to have them treated as images rather than plain assets.

New
You can schedule unpublish
March 18th, 2021

Now, together with scheduling a publication, you can schedule an unpublication.

Read all the details in our documentation page.

Content Management API
Site search reindex without triggering a build
March 15th, 2021

You can now trigger a new site search without launching an entire deploy. This is very useful for technologies permitting per-page deploys, like NextJS for example.

Read the Content Management API documentation page.

UI ImprovementContent Management API
Usability improvements
March 11th, 2021

A set of usability improvements, both on the editorial side and on the development side:

  • custom locales: you can now add whatever locale you want, just type it out and if it doesn't exist, it will be created for you! No more limits here

  • if you have more than 5 items in a dropdown, we'll let you search in there:

  • now also fields can be duplicated. This is particularly useful if you have complex fields with lots of validations (say modular blocks, links, etc) that you need to duplicate with some sligth variations

  • last but not least, we've add a new parameter when getting a record: nested=true. If you add that, you'll get the modular blocks inlined in the record response and not as IDs that then will need another call to retrieve the content. Read in the documentation all the details and see an example.

Content Management API
firstPublishedAt and createdAt are now editable
March 8th, 2021

You are now free to edit the firstPublishedAt and createdAt meta fields of the records.

This is going to be particularly helpful when batch importing records from existing CMS (say WordPress) where those dates need to be set in the past.

UI Improvement
More intuitive blocks with help text (and image preview)
March 4th, 2021

To help editors understand the purpose of each block, we just shipped a new field called Help text that you configure to shown some human-friendly description on the content editing side.

As a bonus, if the field starts with an image URL, it will be shown alongside the help text. Quite handy, isn't it? ๐Ÿ˜ƒ

UI Improvement
Blocks Library and schema editing improvements!
March 4th, 2021

Today we launched a series of UI changes to the schema editing area that we hope will make it clearer and quicker to make changes, especially regarding blocks.

First of all, models can now be filtered with a handy search bar:

The biggest changes, however, are related to blocks. A new Blocks Library section is now visible on the sidebar, giving you an overview of all the blocks your project has defined:

You can also quicky find which Modular Content/Structured Text fields are using a specific block, and move to the field in a single click:

The inverse operation โ€” that is, moving from a Modular Content/Structured Text field to one of its blocks โ€” is one click away too:

To specify which blocks can be used in a Modular Content/Structured Text field, head over to its settings, under the Validations tab: