
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe issue you're seeing is because your schema doesn't have a preview configuration set up! When Sanity doesn't know which field to use as the document title, it defaults to showing "untitled" everywhere.
Here's how to fix it - you need to add a preview configuration to your 'content' schema type. This tells Sanity which field to display as the title:
export default {
name: 'content',
type: 'document',
fields: [
{
name: 'title',
type: 'string',
title: 'Title'
},
// your other fields...
],
preview: {
select: {
title: 'title' // This tells Sanity to use the 'title' field
}
}
}The preview configuration uses two parts:
select: Specifies which fields to pull from your documentprepare (optional): Lets you transform the data before displayIf you want to get fancier, you can add subtitles and media too:
preview: {
select: {
title: 'title',
subtitle: 'description',
media: 'coverImage'
}
}Or use the prepare function for custom formatting:
preview: {
select: {
title: 'title',
publishedAt: 'publishedAt'
},
prepare({title, publishedAt}) {
return {
title: title,
subtitle: publishedAt ? `Published: ${publishedAt}` : 'Draft'
}
}
}Once you add this to your schema and save, your documents should show their actual title instead of "untitled" in lists, references, and search results!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store