Skip to content

🧠 How SanityPress Works

The Schema and the Studio

The SchemaπŸ”—

DocumentsπŸ”—

πŸ“ /src/sanity/schemas/documents

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

  • Site β€” a singleton data type used for global data such as logo(s) and copyright info, etc.
  • Page β€” a Next.js route with a unique slug (permalink) composed of modules (/*).
  • Blog post β€” like page documents but solely for blog content (/blog/*).
  • Blog category β€” useful for filtering blog posts.
  • Announcement β€” schedulable hotline banners displayed above the site header. Make sure to assign in the site document.
  • Navigation β€” a collection of links (header/footers menus and social links, etc).
  • Redirect β€” URL rewrites.
  • Miscellaneous β€” a collection of reusable content that can be referenced within other documents and modules, such as:
    • Logos β€” used in the Logo list module.
    • Person β€” used for blog authors.
    • Pricing tiers β€” used in the Pricing list module.
    • Reputation β€” Enter a GitHub repo to automatically pull the star count and stargazer avatars.
    • Testimonials β€” used in the Testimonial-list and Testimonial (featured) modules.

ObjectsπŸ”—

πŸ“ /src/sanity/schemas/objects

A collection of primitive fields, typically found to compose modules or documents.

  • CTA β€” call-to-action; a wrapper around the link object 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.
  • Metadata β€” a collection of fields used for SEO purposes (title, description, slug, no-indexing, etc).
  • UID β€” unique ID; HTML id attributes used for jump links and selectors for custom CSS.

ModulesπŸ”—

πŸ“ /src/sanity/schemas/modules

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

Each module has a Next.js component file(s) and a corresponding Sanity schema file.

Find a list of all built-in modules (with live examples) here. 🧱

The StudioπŸ”—

yourwebsite.com/admin (replace with your domain)

Hitting "publish" on any document in the Studio will instantly update on your live site. Read more about the Sanity's Live Content API in this blog post.

Screenshots of the Sanity Studio can be found here. πŸ–ΌοΈ