demos-template-system

Guides adding new visual templates to a multi-template Sanity and Next.js demos app.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/ebecerra-developer/ebecerra-web --skill demos-template-system-ebecerra-developer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: demos-template-system
Source: https://github.com/ebecerra-developer/ebecerra-web/tree/main/.claude/skills/demos-template-system
Command: npx skills add https://github.com/ebecerra-developer/ebecerra-web --skill demos-template-system-ebecerra-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new demo site template to the apps/demos monorepo involves coordinated changes across Sanity schemas, design tokens, React components, and routing, and mistakes like shared palettes or portal scoping bugs silently break the multi-template architecture. ## Core Features & Use Cases - Template architecture rules: Enforces one independent template per visual lane, with clear guidance on what to reuse (FisioNavMobile, FisioContactForm, types, urlFor) versus what must be built per-template (Nav, Hero, tokens). - Step-by-step workflow: Covers schema enum updates, sanity schema deploy, scoped token files, component structure, page.tsx wiring, and build verification. - Documented gotchas: Includes the createPortal token-scope fix via templateScope, mobile nav breakpoint overrides, BookingFlow scroll hijack fix, and patterns for private branded demos and multipage ecommerce templates. - Use Case: When asked to create a new dental or consultancy demo site, follow this Skill to add the template enum value, create scoped tokens, build components, and populate Sanity content without breaking existing demos. ## Quick Start Use the demos-template-system skill to add a new dental template to apps/demos with its own tokens, components, and Sanity content.

Frequently Asked Questions about demos-template-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new template to a Sanity-driven Next.js demos app?▼

Add the template value to the demoSite schema enum, run sanity schema deploy from apps/es, create scoped tokens in packages/tokens, build components under apps/demos/components/templates, wire a branch in the page.tsx switch, then verify with a turbo build.

Why does my React portal drawer show the wrong CSS variables?▼

createPortal renders outside the element carrying the data-template attribute, so scoped token selectors no longer match and the drawer falls back to root tokens. Wrap the portal content in a div with the correct data-template value via a templateScope prop.

Should multiple demo sites share one template with different colors?▼

No. The system mandates one independent template per distinct visual lane, because shared structure and components make demos look like repainted copies. Each template gets its own Nav, Hero, tokens, and section components.

Can I store demo content outside the Sanity schema?▼

Yes. When a demo needs structures the demoSite schema does not model, put copy in a typed bilingual content.ts module inside the template folder and keep only a minimal demoSite document in Sanity for routing and gallery purposes.

How do I make a private demo with a real client brand?▼

Set publishedToGallery to false so it is only reachable by direct URL, hide the DemoBanner for that template, use real photos and logo instead of anonymized assets, and optionally render the client logo in the dynamic favicon gated by template.