Appearance
Reference
Complete API, package, and configuration reference for DCS integration.
NPM Packages
Official packages for DCS integration:
| Package | Description |
|---|---|
| @duffcloudservices/cms | Vue 3 composables and Vite plugins |
| @duffcloudservices/cli | CLI for site onboarding and configuration |
Hosting & Deployment
- Visual Editor Annotations — HTML attributes for page editor
API Reference
Text Content API
Public API for fetching text overrides.
- Text Content API — Fetch and manage text overrides
Configuration Files
Reference for all DCS configuration files.
- Site Configuration —
.dcs/site.yamlschema - Pages Configuration —
.dcs/pages.yamlschema - Content Configuration —
.dcs/content.yamlschema (portal-managed) - SEO Configuration —
.dcs/seo.yamlschema (portal-managed)
Quick Links
| Resource | Description |
|---|---|
| Text Content API | Fetch text overrides |
| site.yaml | Site identity configuration |
| Visual Editor | Page editor HTML annotations |
| pages.yaml | Page definitions |
| content.yaml | Text content overrides |
| seo.yaml | SEO metadata configuration |
Environment Variables
Frontend (Vite)
These are read by the @duffcloudservices/cms package. Your generated deployment workflow injects them at build time from your site configuration — most sites never need to set them by hand.
| Variable | Required | Description |
|---|---|---|
VITE_API_BASE_URL | No | DCS API base URL (defaults to https://portal.duffcloudservices.com) |
VITE_SITE_SLUG | No (deprecated) | Legacy site identifier; the site is now resolved server-side from the request host |
VITE_TEXT_OVERRIDE_MODE | No | Text-content override mode used during editing/preview |
File Structure
.dcs/
├── site.yaml # Site identity and deployment configuration
├── pages.yaml # Page definitions
├── content.yaml # Text content (portal-managed)
└── seo.yaml # SEO metadata (portal-managed)Editor Schema Support
DCS provides JSON schemas for all configuration files, enabling autocompletion and validation in VS Code and other editors.
VS Code Setup
Add to your workspace .vscode/settings.json:
json
{
"yaml.schemas": {
"https://schema.duffcloudservices.com/1.0.0/site.json": "/.dcs/site.yaml",
"https://schema.duffcloudservices.com/1.0.0/pages.json": "/.dcs/pages.yaml",
"https://schema.duffcloudservices.com/1.0.0/content.json": "/.dcs/content.yaml",
"https://schema.duffcloudservices.com/1.0.0/seo.json": "/.dcs/seo.yaml"
}
}TIP
The YAML extension by Red Hat is required for schema validation.
Status Codes
Success
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content |
| 304 | Not Modified |
Client Errors
| Code | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
Server Errors
| Code | Meaning |
|---|---|
| 500 | Server Error |
| 503 | Service Unavailable |
