How to structure the content on the front page of a website using Sanity.io.

8 replies
Last updated: Jun 19, 2020
Hello!
I'm implementing this very standard web site, with a front page, some products and a few topic pages.

How should I structure the content on the front page? In particular, there's this intro title and heading that I can't think of a place to put. I have a content type for products, and one for topics. I have a site settings content type, and a generic texts content type. Should I add another one? What should it be?
Jun 18, 2020, 4:46 PM
Hi User, this would be a good question to post in content-modelling as well if you like. I’d say there are a few ways you can go here. You could create a singleton document for the front page and make it a kind of unique schema in your content model, which would give you plenty of freedom to specifically take care of the front page.
Alternatively, and more in line with the structured content philosophy, you could also create a generic
page
type document and let editors add various ‘modules’ to a
content
array field, for example. These modules can be reusable objects for the different pieces of content you’d like people to add to the pages.
If you already have a content type for texts, you could also choose to set up an array of references to those instead, but something like that could also live with other options in the content array above.

Hope this gives some ideas - for deep input, check the other channel
🙂
Jun 19, 2020, 8:14 AM
Maybe this can give you some inspirationStudio for this site
https://23september.se/
https://gist.github.com/User/7ba2a26b3e294da2781e692ba1692a51 <- my deskStructure.js
I would start with title, remember that you may need both page title and tab title, if you handle slugs through sanity you also need that for all the pages
Jun 19, 2020, 8:15 AM
Hi User, this would be a good question to post in content-modelling as well if you like. I’d say there are a few ways you can go here. You could create a singleton document for the front page and make it a kind of unique schema in your content model, which would give you plenty of freedom to specifically take care of the front page.
Alternatively, and more in line with the structured content philosophy, you could also create a generic
page
type document and let editors add various ‘modules’ to a
content
array field, for example. These modules can be reusable objects for the different pieces of content you’d like people to add to the pages.
If you already have a content type for texts, you could also choose to set up an array of references to those instead, but something like that could also live with other options in the content array above.

Hope this gives some ideas - for deep input, check the other channel
🙂
Jun 19, 2020, 8:14 AM
(Thanks User! Love the icons for Header/Footer btw 😄🧦)
Jun 19, 2020, 8:16 AM
you could also create a generic 
page
 type document and let editors add various ‘modules’ to a 
content
 array field
This is exactly what I ended up doing. And I think - at some point, it made Sanity as a CMS for these kinds of sites really click for me.
Jun 19, 2020, 8:16 AM
I'm back in love with Sanity now, thanks!
Jun 19, 2020, 8:17 AM
great page User ❤️
Jun 19, 2020, 8:17 AM
and thanks for the tip about content-modelling - I'll head over there right away
Jun 19, 2020, 8:17 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?