Skip to content

πŸ“š Schema & Modules

Screenshots of the Sanity Studio can be found here.

DocumentsπŸ”—

High-level standalone data types, typically found in the sidebar of the Sanity Studio.

  • Site β€” A singleton data type used to house any global data like header/footer menus and logos, etc.
  • Page β€” webpage with a unique slug (permalink) composed "modules".
    • Use slug index for the Home page of the website.
    • Use slug 404 for the Page not found page of the website.
    • Use slug blog for the Blog page of the website.
  • Blog post β€” like Page documents but with fields tailored to blog writing.
  • Blog category
  • Announcement β€” schedule-able hotline banner displayed above the site header. Make sure to assign in the Site document.
  • Navigation β€” a collection of Links. For use with dropdowns/megamenus, social links, etc.
  • Redirect
  • Miscellaneous β€” a collection of reusable content that can be referenced within other documents/modules. Yours to add more and customize:
    • Logos
    • Pricing tiers
    • Reputation
      • entering a GitHub repo will automatically pull the star count and most recent stargazer avatars
    • Testimonials

ObjectsπŸ”—

A collection of primitive fields, typically found inside Modules or Documents.

  • CTA (Call-to-action) β€” a superset of Link with additional.
  • Link β€” a collection of fields used to reference internal pages or link to external URLs.
  • Link list β€”Β an array of Links, used in Navigation documents as dropdowns/megamenus, etc.
  • Metadata β€” a collection of fields used for SEO purposes (title, description, slug, no-indexing, etc).

ModulesπŸ”—

Document schema types are composed of building blocks called modules (a.k.a "sections", Next.js components) that can be re-used and re-ordered. Modules are meant to be added and customized to suit your needs.

Each module will have the schema residing in the Sanity Studio and a counterpart component in the Next.js frontend.

See modules in action on the playground.

Helpful Articles on Modules

Read more on The SanityPress Blog