Skip to main content
This guide shows you how to build a brand website using Publive’s Decoupled Frontend Infrastructure. You’ll learn how to:
  • Set up the brand website starter
  • Create brand pages in Publive CMS
  • Build reusable layout sections
  • Register and render custom components
  • Deploy your changes to production

Prerequisites

Before you begin, ensure you have completed onboarding and received:
GitHub Repository Access - Clone access to your brand starter repo
Publive CMS Access - Login credentials to the CMS dashboard
Publisher Credentials - API keys and secrets for authentication
Environment Mapping - Branch-to-environment mapping (e.g., beta → staging, main → production)
Deployment URL - Live URL where your site will be hosted

Step 1: Run the Starter Locally

Clone the Repository

Replace pl-brand-starter with your actual repository name provided during onboarding.

Install Dependencies

Configure Environment Variables

Copy the sample environment file:
Add your credentials to .env:
.env

Start Development Server

Open your browser to:
You now have a working brand website powered by Publive CMS data!

Step 2: Understand the Brand Page Model

Brand pages in Publive are built from layout sections - reusable building blocks that you can arrange in any order.

Page Structure

Each brand page contains:
object
Page-level information like title, slug, and SEO fields
array
Ordered list of section components that make up the page

Section Structure

Each layout section has:
string
required
Unique identifier for the section type (e.g., hero-banner-image)
object
required
Structured content fields specific to that section type

Rendering Flow

The website automatically:
  1. Reads the layout array from CMS
  2. Finds the matching React component for each schema_slug
  3. Passes the section’s fields as props to the component
  4. Renders components in the specified order

Step 3: Create Your First Brand Page

In Publive CMS

1

Open Content Type

Navigate to your brand pages content type in the CMS
2

Verify Layout Field

Ensure the content type has a layout (dynamic zone) field
3

Create New Page

Click “Create New Entry” to start a new brand page
4

Add Metadata

Fill in basic information:
  • Title: Page title for SEO
  • Slug: URL path (e.g., about-us)
  • Meta Description: SEO description
5

Add Layout Sections

Click “Add Section” in the layout field and choose from available section types
6

Publish

Click “Publish” to make your page live
Your page will now render automatically on your website at the slug you specified!

Step 4: Add Sections to Your Page

Sections are reusable building blocks. Let’s create a hero banner section as an example.

Define Section in CMS

1

Create Section Schema

In CMS, create a new section schema with these fields:
2

Add to Page Layout

In your brand page, add this section to the layout field
3

Fill Content

Populate the section fields with your content:
  • Heading: “Welcome to Our Brand”
  • Sub text: “Building the future”
  • Upload a banner image

Step 5: Build the Matching Component

Create a React component that matches the CMS fields exactly.

Create Component File

components/sections/HeroBannerImage.tsx
Critical Rule: Component prop names MUST match CMS field names exactly. If CMS uses sub_text, your component must use sub_text (not subText or subtitle).

Step 6: Register the Section

Map the section slug to your component in the configuration file.

Update Configuration

publive.config.ts
Now, when CMS sends a layout item with:
The website automatically renders the HeroBannerImage component with those props.

Step 7: Create Custom Sections

Follow this workflow to build new sections from scratch:
1

Design Section

Create or review the design in Figma or design tool
2

Define CMS Schema

Create the section schema in CMS with a unique schema_slug
3

Build React Component

Create a component matching the CMS fields
4

Register Component

Add to publive.config.ts:
5

Add to CMS Page

Add the section to a page’s layout field in CMS
6

Test & Verify

Check the section renders correctly with all field variations
This loop is how brand websites scale. Each new section becomes a reusable building block.

Step 8: Validate Your Page

Before deploying, verify:
✅ Sections render in the same order as the CMS layout array
✅ Optional fields don’t break rendering when empty
✅ Images load correctly with proper alt text ✅ Image optimization is working (Next.js Image component)
✅ Draft content only shows in preview mode ✅ Published content appears on live site

Step 9: Deploy Your Changes

Standard Deployment Workflow

1

Create Feature Branch

2

Commit Changes

3

Push to Remote

4

Create Pull Request

Open a PR on GitHub to your environment branch (e.g., beta or main)
5

Review & Merge

After code review, merge the PR
6

Automatic Deployment

CI/CD automatically deploys the latest version to your live URL

Branch → Environment Mapping

Confirm your branch-to-environment mapping during onboarding:
Merging to main triggers immediate production deployment. Always test in staging first!

Common Section Patterns

Text Content Section

Call-to-Action Section

Team Section

Best Practices

  • Type Safety — Define TypeScript interfaces for all section props
  • Prop Naming — Match CMS field names exactly in component props
  • Optional Fields — Handle optional fields gracefully with conditional rendering
  • Image Optimization — Always use Next.js Image component for automatic optimization
  • Reusability — Design sections to be reusable across multiple pages
  • Testing — Test all field variations (required, optional, empty states)

Troubleshooting

Possible causes:
  • schema_slug mismatch between CMS and config
  • Component not exported correctly
  • Prop name mismatch between CMS fields and component
Solution: Check browser console for errors and verify naming matches exactly.
Possible causes:
  • Image URL not accessible
  • Missing Next.js Image domain configuration
Solution: Add CMS domain to next.config.js:
Possible causes:
  • CSS modules not imported
  • Tailwind classes not generated
Solution: Ensure CSS is imported and Tailwind config includes your component paths.

Support

Need help building your brand website?
Last modified on July 21, 2026