← Back to Work
Consumer Registry
Routing Engine-core Extensibility

Consumer Registry

Add pages the theme doesn't know about — without forking the theme. A single JSON file declares the route; src/pages-local/ holds the .astro file.

The problem

Theme routes are great for the 90% case (home, about, work, writing, contact, résumé). But sometimes you need a page the theme doesn’t ship — /vision, /workflow, /architecture, a campaign landing page. You don’t want to fork the theme, and you don’t want to add a runtime escape hatch that’s hard to reason about.

The solution

Declare consumer-local routes in src/registry/portfolio-engine.registry.json and put the actual .astro files in src/pages-local/. The engine picks them up, checks for collisions with theme routes, and injects them through Astro’s injectRoute hook.

{
  "version": 1,
  "localRoutes": [
    {
      "pattern": "/vision",
      "page": "vision.astro",
      "label": "Vision",
      "section": null,
      "visibility": "public"
    }
  ]
}

How it appears in the manifest

Every build emits .portfolio-engine/manifest.json with the resolved route registry. Consumer-local routes are tagged with routeOrigin: "consumer-local" so the doctor command and admin tools can tell them apart from theme routes.

This site uses the consumer registry for five pages: /vision, /workflow, /architecture, /features, and /contribute. Each one demonstrates a different capability that’s easier to express outside the theme’s stable surface.