Is there a way to set a default sort ordering in your documents?
S.documentList()
.title("Blog")
.filter('_type == "blog"')
.menuItems([...S.documentTypeList("blog").getMenuItems()]){
name: "blog",
title: "Blog",
type: "document",
...,
orderings: [
{
title: "Title",
name: "title",
by: [{ field: "title", direction: "asc" }],
},
],
}Was this answer helpful?
Sanity – Build the way you think, not the way your CMS thinks
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.