Creating a New Site
Last modified with commit 013f4f2 on
by Sara Deric.
To create a new site, follow these steps:
Client defines these:
- Site name
- Theme primitives (base colors, typography choices, border radius)
- Content structure (types of pages, content fields, etc.)
- domain name
- list of languages and the default language
- define which footer to use
Developer Setup Steps
1. Configuration Files
Add brand to deployment:
.github/workflows/deploy.yml- Add toBRANDSenv varREADME.md- Add URLs and commandspackage.json- Adddev:{brand}andbuild:{brand}scriptsbin/build.sh- Add to validation regex + Turbo site IDbin/dev.js- Add to allowed sites
Hugo config:
config/{brand}/hugo.toml- Site config with params, social links, module mountsconfig/{brand}/menus.json- Navigation structure (main, cta, relatedbrands)
CMS config:
static/admin/config.{brand}.yaml- Decap CMS collections
2. Brand Styling
File: assets/{brand}/styles/_brand-theme.scss
Define CSS variables for:
- Brand colors (primary, secondary with 100/120 variants)
- Accented colors (text, surfaces, borders)
- Font families (display, heading, title, body, label, supporting, button)
- Font weights for each family
3. Content & Data Files
Content:
content/{brand}/_index.{lang}.md- Homepage for each language
Data files in data/{brand}/:
Translations:
i18n/{lang}.toml- UI strings for new languages (see existing files for required keys)
4. Static Assets
Directory: static/{brand}/
favicon.png- Site favicon
5. Decap Turbo
- Log in to Decap Turbo dashboard
- Add new site with project name:
cmt-{brand} - Get the Turbo Site ID from dashboard
- Add ID to
bin/build.shinresolve_turbo_site_id()function:{brand}) TURBO_SITE_ID="your-turbo-site-id-here" ;;
6. Cloudflare Deployment
- Create Pages project:
cmt-{brand} - Connect to GitHub repository
- Add required environment variables:
HUGO_VERSION(e.g.,0.154.5)NODE_VERSION(e.g.,20)- …
- Disable automatic deployments - we use GitHub Actions for builds instead
Timeline
The deadline for creating a new site is 5 working days since the client provides all necessary inputs defined above. The client must inform the contractor 2 weeks in advance about the intention to create a new site.