Skip to content
CONTACT SALESSTART BUILDING
Landing pages
Blog Article
Hero Section
Navigation Links
Announcement Bar
Product Details
Product Editorial
Homepage
Request a blueprintGo to developer docs

Integrate Visual Editing of Your Homepage

enterprise plans

A direct option for giving non-developer teammates access to editing your homepage is to integrate landing pages and use the same code for your homepage. In this way, choosing / as a page's URL shows it on the homepage.

Alternatively, you can make a dedicated section model for your homepage. This is preferable if you make many variations of your homepage.

Model definition

A standard section model named homepage is all you need.

By default, you don't need any fields but may choose to add targeting to show different visitors different versions of your homepage.

Example code

// pages/collections/[collection].jsx
import { BuilderComponent, builder } from '@builder.io/react';

// Replace with your Public API Key.
builder.init(YOUR_API_KEY);

export async function getStaticProps({ params }) {
  const homepage = await builder.get('homepage').toPromise();

  return {
    props: {
      homepage: homepage || null,
    },
  };
}

export default function Page({ homepage }) {
  return (
    <>
      {/* Put your header here. */}
      <YourHeader />
      <BuilderComponent model="homepage" content={homepage} />
      {/* Put your footer here. */}
      <YourFooter />
    </>
  );
}