developers

Docs Themes Custom pages

Custom pages

The fourteen contract pages cover a service business. When a merchant needs something else — a gallery, an events calendar — a theme can declare extra routes.

Declaring them

index.ts
import GalleryPage from "./app/gallery/page";
import EventPage from "./app/events/[slug]/page";

export const customPages = {
  gallery: GalleryPage,          // /gallery
  "events/[slug]": EventPage,    // /events/<slug>, params.slug = the child segment
};

Each key is a path; a parent/[slug] key is a two-segment detail route. Keep customPages an object literal in index.ts so the build check can read its paths.

Platform paths are off-limits. No custom page may sit under login, logout, account, orders, order, subscriptions, addresses, checkout, cart, invoice or api — in any letter case. Those are the platform’s sign-in, account and checkout pages, the same on every theme. The build fails a theme that declares one, and the storefront answers 404 for any custom page there anyway, including a merchant’s own page from the visual editor or the Merchant MCP.

When not to use one

If the content is a listing, model it as a listing. Custom pages do not appear in search, sitemaps or the merchant’s normal editing flows the way contract pages do, so reaching for one to avoid learning the data model usually costs the merchant later.