Docs/Build a site/Use the page registry

Build a site

Use the page registry

Connect registered route metadata to pages implemented in your Next.js project.

The website owns the page

The Web Manager registry stores page identity and discovery metadata: title, route, status, navigation placement and order, SEO title and description, and an optional frontend template key. It does not store the page body, create a route file, or define its layout.

Implement the route in code.Register a page after its Next.js route is built. A registry entry alone does not make an unimplemented path render.

Fetch published pages

const endpoint = new URL('/v1/public/institutions/content', process.env.GOVCMS_API_URL)
endpoint.searchParams.set('siteId', process.env.GOVCMS_SITE_ID!)
endpoint.searchParams.set('type', 'page')
const response = await fetch(endpoint)
if (!response.ok) throw new Error(`GovCMS returned ${response.status}`)
const { data } = await response.json()
const pages = data.records

Read route metadata

type PageRegistry = {
  routePath: string
  navigationLabel: string
  navigationAreas: Array<'top_header' | 'header' | 'footer'>
  navigationOrder: number
  seoTitle: string
  seoDescription: string
  templateKey: string
}

const registry = record.metadata.pageRegistry as PageRegistry
// Example: '/about/leadership'
const route = registry.routePath

Metadata is optional for older page records. Validate it before use and fall back to the record title or slug only when the site’s route policy allows it. Use navigationAreas to decide whether a published page belongs in a menu, and sort those menu entries by navigationOrder.

Map template keys explicitly

templateKey is a site-defined adapter hint, not a page builder. Map only keys implemented by your project; an unknown key should not silently change the page design.