Skip to content

Site Configuration

The .dcs/site.yaml file defines core site identity and DCS integration settings.

Overview

yaml
# .dcs/site.yaml
site_name: My Website
site_slug: my-website
production_url: https://www.mywebsite.com
portal_api_url: https://portal.duffcloudservices.com/api
app_location: docs/.vitepress/dist

Schema

PropertyTypeRequiredDescription
site_namestringYesHuman-readable name of the site
site_slugstringYesUnique identifier (lowercase, hyphens)
swa_resource_idstringNoAzure Static Web App resource ID
production_urlstringNoProduction URL of the site
preview_urlstringNoPreview URL for staging
app_locationstringNoBuild output directory
output_locationstringNoOutput folder relative to app_location
google_analytics_idstringNoGoogle Analytics Measurement ID
portal_api_urlstringNoURL of the DCS Portal API
azureobjectNoAzure OIDC authentication config
snapshotsobjectNoSnapshot storage configuration
contentobjectNoContent API configuration
metadataobjectNoSite metadata

Properties

site_name & site_slug

Core site identification:

yaml
site_name: Acme Corporation Website
site_slug: acme-corp
  • site_name: Display name shown in the DCS Portal
  • site_slug: Unique identifier used in URLs and file paths

URLs

yaml
production_url: https://www.acmecorp.com
preview_url: https://preview.acmecorp.com
portal_api_url: https://portal.duffcloudservices.com/api

Build Configuration

yaml
app_location: docs/.vitepress/dist
output_location: "."

azure

Azure authentication for OIDC-based deployments:

yaml
azure:
  client_id: 00000000-0000-0000-0000-000000000000
  tenant_id: 00000000-0000-0000-0000-000000000000
  subscription_id: 00000000-0000-0000-0000-000000000000

snapshots

Configure snapshot storage for the visual page editor:

yaml
snapshots:
  storage_account: dcssnapshotsprod
  container: snapshots

content

Content API configuration:

yaml
content:
  api_version: "1.0"

metadata

Site metadata for tracking and organization:

yaml
metadata:
  framework: vitepress
  managed_by: partner  # or "dcs"
  created_at: "2025-01-15T10:00:00Z"

Editor Schema

Enable intelligent autocompletion in VS Code:

json
{
  "yaml.schemas": {
    "https://schema.duffcloudservices.com/1.0.0/site.json": "/.dcs/site.yaml"
  }
}

Full Example

yaml
# .dcs/site.yaml

site_name: Acme Corporation
site_slug: acme-corp

swa_resource_id: /subscriptions/.../resourceGroups/.../providers/Microsoft.Web/staticSites/acme-corp

production_url: https://www.acmecorp.com
preview_url: https://preview.acmecorp.com

app_location: docs/.vitepress/dist
output_location: "."

google_analytics_id: G-XXXXXXXXXX

portal_api_url: https://portal.duffcloudservices.com/api

azure:
  client_id: 12345678-1234-1234-1234-123456789abc
  tenant_id: 87654321-4321-4321-4321-cba987654321
  subscription_id: abcd1234-ab12-cd34-ef56-abcdef123456

snapshots:
  storage_account: dcssnapshotsprod
  container: snapshots

content:
  api_version: "1.0"

metadata:
  framework: vitepress
  managed_by: partner
  created_at: "2025-01-15T10:00:00Z"

Duff Cloud Services Documentation