Pages Configuration
The .dcs/pages.yaml file defines which pages are manageable through the DCS portal.
Overview
yaml
# .dcs/pages.yaml
version: 1
pages:
- slug: home
path: /
type: static
title: Home
deletable: false
textKeys:
- home.hero.title
- home.hero.subtitleSchema
Root Properties
| Property | Type | Required | Description |
|---|---|---|---|
version | number | Yes | Schema version (currently 1) |
pages | array | Yes | List of page definitions |
Page Properties
| Property | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Unique URL-safe identifier |
path | string | Yes | URL path for the page |
type | string | Yes | static, index, or dynamic |
title | string | Yes | Human-readable page title |
deletable | boolean | No | Whether page can be deleted (default: true) |
textKeys | array | No | Text keys used on this page |
template | string | No | Template to use for new pages |
dynamicParam | string | No | Dynamic parameter name for dynamic pages |
Page Types
Static Pages
Regular pages created by users:
yaml
- slug: about
path: /about
type: static
title: About Us
deletable: true
textKeys:
- about.hero.title
- about.team.titleIndex Pages
Collection landing pages (protected):
yaml
- slug: blogs
path: /blogs
type: index
title: Blog
deletable: falseDynamic Pages
Generated pages with URL parameters:
yaml
- slug: blog-post
path: /blogs/:slug
type: dynamic
title: Blog Post
deletable: false
dynamicParam: slugExamples
Minimal Configuration
yaml
version: 1
pages:
- slug: home
path: /
type: static
title: Home
deletable: falseStandard Site
yaml
version: 1
pages:
# Home page (protected)
- slug: home
path: /
type: static
title: Home
deletable: false
textKeys:
- home.hero.title
- home.hero.subtitle
- home.features.title
# About page
- slug: about
path: /about
type: static
title: About
deletable: true
textKeys:
- about.hero.title
- about.mission.title
- about.mission.description
# Services page
- slug: services
path: /services
type: static
title: Services
deletable: true
# Contact page
- slug: contact
path: /contact
type: static
title: Contact
deletable: true
textKeys:
- contact.form.title
# Blog index (protected)
- slug: blogs
path: /blogs
type: index
title: Blog
deletable: false
# Individual blog posts
- slug: blog-post
path: /blogs/:slug
type: dynamic
title: Blog Post
deletable: false
dynamicParam: slugE-commerce Site
yaml
version: 1
pages:
- slug: home
path: /
type: static
title: Home
deletable: false
- slug: products
path: /products
type: index
title: Products
deletable: false
- slug: product
path: /products/:id
type: dynamic
title: Product Detail
dynamicParam: id
- slug: categories
path: /categories
type: index
title: Categories
deletable: false
- slug: category
path: /categories/:slug
type: dynamic
title: Category
dynamicParam: slug
- slug: cart
path: /cart
type: static
title: Cart
deletable: false
- slug: checkout
path: /checkout
type: static
title: Checkout
deletable: falseText Keys
Key Naming Convention
{page}.{section}.{element}Examples:
home.hero.titleabout.team.descriptioncontact.form.submit
Nested Keys
For repeated elements:
{page}.{section}.{index}.{element}Examples:
home.features.0.titlehome.features.1.titlehome.testimonials.0.quote
Auto-Discovery
DCS can auto-discover text keys during snapshot:
yaml
- slug: home
path: /
type: static
title: Home
textKeys: [] # Auto-populated during snapshotProtected Pages
Certain slugs should always be protected:
yaml
# These should have deletable: false
- slug: home
deletable: false
- slug: blogs
deletable: false
- slug: 404
deletable: falseCreating Pages via Portal
When users create pages through the portal:
- New entry added to
pages.yaml - Page file created from template
- Development request auto-created
- GitHub Copilot implements content
Template Reference
yaml
- slug: services
path: /services
type: static
title: Services
deletable: true
template: standard # Uses standard page templateAvailable templates:
standard— Basic page with herolanding— Marketing landing pagecontent— Long-form content page
Validation
Required Fields
All pages must have:
slug— Unique, URL-safepath— Valid URL pathtype— One of:static,index,dynamictitle— Non-empty string
Slug Rules
- Lowercase only
- Hyphens for word separation
- No special characters
- Unique across all pages
Path Rules
- Must start with
/ - Dynamic segments use
:paramsyntax - Must be unique for static pages
CLI Commands
Validate pages.yaml
bash
dcs pages validateList all pages
bash
dcs pages listAdd a page
bash
dcs pages add --slug about --path /about --title "About Us"Troubleshooting
Page Not Appearing in Portal
- Verify
pages.yamlsyntax - Check slug uniqueness
- Ensure path is valid
- Run validation:
dcs pages validate
Text Keys Not Working
- Verify key format:
page.section.element - Check for typos in component usage
- Ensure text override exists in portal
Dynamic Page Issues
- Verify
dynamicParamis set - Check path includes
:paramsegment - Ensure data source provides param values
Next Steps
- DCS Configuration — Main config file
- Text Editing — Portal text management
- Sites Setup — Full integration guide
