CoursesBuild landing pages with Next.jsScaling page builders and pitfalls
Track
Work-ready Next.js

Build landing pages with Next.js

Lesson
8

Scaling page builders and pitfalls

How to keep your page builder tidy as your project grows over time.
Log in to mark your progress for each Lesson and Task

Your page builder works just fine at this stage. But what happens when you have 20 more components, 100 more pages, and 10 more users? This lesson covers those questions and the pitfalls ahead.

If a block has too many variations, you're going to run into a lot of edge cases. It's also difficult to manage because you will have to pick a thumbnail as the main image for the block. If your variation is different from the main image it becomes confusing for the content team to differentiate between the variations.

Here's a good rule of thumb: if you have more than two variations of a block, you should consider splitting them into individual blocks.

Think carefully about modeling your content as a page builder or a document type. If you want your content to be more rigid and you want to be able to reuse the same block in multiple places, then you should use a document type.

Alternatively, if you want your content to be reordered, have different layouts, or have different components, then you should use a page builder.

To help your marketing team create pages efficiently, limit the number of block options available. Too many choices can confuse and overwhelm, leading to mistakes and delays in content creation.

For example, if a "features" block is unnecessary for a "case study," remove it from the options for that document type. This streamlines the process and makes it easier for new team members to navigate.

This is the number one mistake I see in the wild.

Avoid making your entire page builder an array of references; it's more difficult to scale. The reason is that often, you won't need to use the same referenced block in multiple places.

One of the few exceptions is a repeated call to action where the text is identical or you might have two different versions that appear on many different pages. This is a good use case for references. If there is not a clear need to re-use content across many pages—use an object.

As you scale your website and your page builder, you will naturally have blocks that you no longer use. You should prune them regularly to eliminate technical debt.

If you do need to start removing blocks, consider the course Handling schema changes confidently.

What you've built in this course is a basic implementation using default settings. The dynamic nature of building Sanity Schema with TypeScript lends itself to opinionated abstractions. Take a look at these resources for some inspiration:

You've made it to the end of the course. You're now fully equipped to start building your own page builders with confidence. We hope this structured approach to page building will make content management simpler and more efficient for your team.

We'd love to see the page builders that you create, tag us on X or join our community to share any projects you create

Mark lesson as complete
You have 1 uncompleted task in this lesson
0 of 1