Search code examples
sanity

Can you create a folder of documents in Sanity and how?


I have a lot of documents of same type and i want to organize them in folders and subfolders. Is that possible in sanity?


Solution

  • Sanity doesn't have a concept of generic folders/subfolders in the traditional sense. But there's a new(ish) feature called Structure that makes it possible to declare nested navigation hierarchies in the content studio. Sounds like it could be a good match for your use case: https://www.sanity.io/docs/content-studio/structure-builder.

    In particular the section about segmented content would be relevant I think: https://www.sanity.io/docs/structure-builder/how-it-works#segmented-content

    Structure was introduced in version 0.134.0, so you may have to upgrade your content studio with sanity upgrade to start using it.