Docs
Architecture
Pages
Overview

Pages

The pages folder contains json files and each json file represents one page. There are some required pages that must be defined. There are some optional pages as well. Other than these, custom pages can be defined as well.

Basic page schema

A basic page might look like this:

pages/index.json
{
  "schema": "https://builderoo.dev/schema/page.json",
  "layout": {
    "component": "DefaultLayout"
  },
  "sections": [
    {
      "component": "PageIntro"
    },
    {
      "component": "FeaturedProducts"
    },
    {
      "component": "ProductCategories"
    },
    {
      "component": "Subscribe"
    }
  ]
}

See PageSchema object for a full structure.

Page types

There are various types of pages. Each types of pages shows different types of data. Multiple variations can be created for each page types. The file names of the pages follow this format:

type name.variation name.json

Here are all the types:

TypeExample file nameData hook
indexindex.json
productproduct.json
product.shoes.json
product.clothes.json
useProduct()
collectioncollection.json
collection.flashy.json
collection.minimal.json
useCollection()
collectioncollections.jsonuseCollectionList()
searchsearch.jsonuseSearch()
orderorder.jsonuseOrder()
ordersorders.jsonuseOrderList()
blogblog.json
blog.offers.json
useOrder()
articlearticle.json
article.gallery.json
useArticle()

Some page types have special React hook that returns data for those specific pages as shown in the table above. These are page specific hooks, meaning, these hooks cannot be used in other pages. Same hook can be used multiple times in multiple sections of a page.

There are also custom pages that can be built-in in the theme. Users can also create and edit custom pages from the admin panel. This is explained in Custom Pages