DCS Configuration Reference
Partner Documentation
Comprehensive reference for .dcs/config.yaml configuration options.
Configuration File Location
your-site/
└── .dcs/
├── config.yaml ← Main configuration
└── pages.yaml ← Page registrySite Configuration
Required Fields
yaml
site:
slug: my-site # Required: Unique identifier
name: My Site # Required: Display nameOptional Fields
yaml
site:
slug: my-site
name: My Site
description: A great website
language: en-US # Default language
timezone: America/New_York # Default timezone
url: https://mysite.com # Production URL
devUrl: https://dev.mysite.com # Development URLSlug Requirements
- Lowercase letters, numbers, hyphens only
- Start with a letter
- 3-50 characters
- Must be unique across DCS
API Configuration
Basic Setup
yaml
api:
endpoint: https://portal.duffcloudservices.com/apiAdvanced Options
yaml
api:
endpoint: https://portal.duffcloudservices.com/api
timeout: 5000 # Request timeout in ms
retries: 3 # Number of retries
retryDelay: 1000 # Delay between retries
headers: # Custom headers
X-Custom-Header: valueEnvironment-Specific Endpoints
yaml
# Development
api:
endpoint: ${VITE_DCS_API} # Use env variable
# Or explicit environments
api:
development:
endpoint: https://dev.portal.duffcloudservices.com/api
production:
endpoint: https://portal.duffcloudservices.com/apiFeature Flags
Enable or disable DCS features:
yaml
features:
textOverrides: true # Real-time text editing
seoMetadata: true # SEO management
blog: true # Blog CMS
analytics: true # Analytics tracking
devRequests: true # Development requests
versioning: true # Release version tracking
previews: true # PR preview deploymentsFeature Dependencies
| Feature | Depends On |
|---|---|
blog | textOverrides |
devRequests | versioning |
previews | versioning |
Build Configuration
yaml
build:
command: pnpm build # Build command
outputDir: .vitepress/dist # Output directory
contentDir: docs # Content source directory
nodeVersion: 22 # Node.js version
packageManager: pnpm # Package manager
# Pre/post build hooks
preBuild:
- pnpm fetch:content # Fetch DCS content
postBuild:
- pnpm generate:sitemap # Generate sitemap
# Environment variables for build
env:
VITE_DCS_API: https://portal.duffcloudservices.com/apiDeployment Configuration
Azure Static Web Apps
yaml
deployment:
provider: azure-swa
development:
resourceId: /subscriptions/.../staticSites/my-site-dev
customDomain: dev.mysite.com
production:
resourceId: /subscriptions/.../staticSites/my-site-prod
customDomain: mysite.com
customDomainWww: www.mysite.comDeployment Settings
yaml
deployment:
provider: azure-swa
settings:
stagingEnvironment: true # Enable staging slots
previewsEnabled: true # PR previews
skipBuild: false # Skip SWA build (we build ourselves)
auth:
providers:
- aad # Azure AD
- github # GitHub
routes:
/admin/*:
allowedRoles: [admin]Analytics Configuration
yaml
analytics:
enabled: true
tracking:
pageViews: true # Track page views
events: true # Track custom events
scrollDepth: true # Track scroll depth
outboundLinks: true # Track external links
privacy:
anonymizeIp: true # Anonymize IP addresses
respectDoNotTrack: true # Honor DNT header
cookieConsent: true # Require consent
exclude:
paths: # Exclude paths
- /admin/*
- /preview/*
ips: # Exclude IPs
- 192.168.1.1Content Configuration
Text Overrides
yaml
content:
textOverrides:
enabled: true
caching:
enabled: true
ttl: 300 # Cache TTL in seconds
strategy: stale-while-revalidate
fallback:
enabled: true # Show defaults if API fails
logErrors: true # Log API errorsBlog
yaml
content:
blog:
enabled: true
paths:
posts: /blog # Blog index path
post: /blog/:slug # Post path pattern
category: /blog/category/:slug
tag: /blog/tag/:slug
features:
comments: false # Enable comments
sharing: true # Social sharing
relatedPosts: true # Show related posts
pagination:
postsPerPage: 10
rss:
enabled: true
path: /blog/feed.xmlSEO
yaml
content:
seo:
enabled: true
defaults:
titleTemplate: '{title} | {siteName}'
siteName: My Site
defaultImage: /images/og-default.jpg
twitterHandle: '@mysite'
sitemap:
enabled: true
path: /sitemap.xml
changefreq: weekly
priority: 0.7Cache Configuration
yaml
cache:
enabled: true
content:
ttl: 300 # 5 minutes
staleWhileRevalidate: true
static:
maxAge: 31536000 # 1 year for static assets
api:
ttl: 60 # 1 minute for API responsesDevelopment Settings
yaml
development:
debug: true # Enable debug mode
localApi:
enabled: true # Use local API
url: http://localhost:8080/api
mockData:
enabled: false # Use mock data
path: .dcs/mock-data.json
hotReload:
content: true # Hot reload content changes
config: true # Hot reload config changesValidation Schema
yaml
# JSON Schema for validation
$schema: https://duffcloudservices.com/schemas/dcs-config.json
site:
slug: my-site
name: My Site
# ... rest of configComplete Example
yaml
# .dcs/config.yaml
$schema: https://duffcloudservices.com/schemas/dcs-config.json
site:
slug: acme-website
name: Acme Corporation
description: Official website for Acme Corporation
language: en-US
url: https://acme.com
devUrl: https://dev.acme.com
api:
endpoint: https://portal.duffcloudservices.com/api
timeout: 5000
retries: 3
features:
textOverrides: true
seoMetadata: true
blog: true
analytics: true
devRequests: true
versioning: true
build:
command: pnpm build
outputDir: .vitepress/dist
contentDir: docs
preBuild:
- pnpm fetch:content
deployment:
provider: azure-swa
development:
resourceId: /subscriptions/.../staticSites/acme-dev
production:
resourceId: /subscriptions/.../staticSites/acme-prod
analytics:
tracking:
pageViews: true
events: true
privacy:
anonymizeIp: true
content:
textOverrides:
caching:
enabled: true
ttl: 300
blog:
paths:
posts: /blog
pagination:
postsPerPage: 10Environment Variables
Config values can reference environment variables:
yaml
api:
endpoint: ${VITE_DCS_API}
deployment:
production:
resourceId: ${AZURE_SWA_PROD_ID}Next Steps
- pages.yaml Reference — Page configuration
- GitHub Setup — Repository configuration
- Deployment — Deployment workflows
