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.
Read more in the blog post here. π£οΈ
Global data
- Site β a singleton data type used for global data such as logo(s) and copyright info, etc.
Page & blog data (routes)
- 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.
Menus & redirects
- 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:
- Announcement β schedule-able hotline banners displayed above the site header. Make sure to register them in the site document.
- 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. π§±
Learn how to schedule content with the Schedule module.
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. πΌοΈ