Configuration
Site settings, navigation, layouts, themes, and server configuration

Site Settings

Managed at Admin → Settings. Stored in config/site.json. These values control the identity, typography, SEO, email delivery, footer, social links, and several opt-in UI features of your site.

{
  "identity": {
    "title": "My Site",                        // Browser tab title and OG title
    "tagline": "Fast. Flexible. Beautiful.",   // Short strapline shown in hero/footer
    "description": "A site built with Domma CMS.",
    "logo": "/assets/logo.svg",                // Path to logo image
    "favicon": "/assets/favicon.svg",          // Shown in browser tab
    "url": "https://mysite.example.com"        // Canonical base URL (no trailing slash)
  },

  "typography": {
    "headingFont": "Inter",                    // Google Font name or 'system'
    "bodyFont": "Inter"                        // Applied to body text
  },

  "seo": {
    "googleAnalytics": "G-XXXXXXXXXX",         // GA4 measurement ID (leave blank to disable)
    "sitemapEnabled": true,                    // Auto-generates /sitemap.xml on build
    "robotsTxt": "User-agent: *\nAllow: /"    // Written verbatim to /robots.txt
  },

  "smtp": {
    "host": "smtp.gmail.com",                  // SMTP server hostname
    "port": 587,                               // 587 (STARTTLS) or 465 (SSL)
    "user": "you@example.com",                 // SMTP username
    "password": "your-app-password",           // SMTP password or app-specific password
    "from": "noreply@mysite.example.com"       // From address for outbound emails
  },

  "footer": {
    "copyright": "© 2026 My Site. All rights reserved.",
    "links": [
      { "text": "Privacy Policy", "url": "/privacy" },
      { "text": "Terms of Service", "url": "/terms" }
    ]
  },

  "social": {
    "twitter": "https://x.com/myhandle",
    "github": "https://github.com/myorg",
    "linkedin": "https://linkedin.com/company/myorg",
    "youtube": "https://youtube.com/@mychannel"
  },

  "backToTop": {
    "enabled": true,
    "position": "fixed-right"                 // fixed-right | fixed-left
  },

  "cookies": {
    "enabled": true,
    "message": "We use cookies to improve your experience.",
    "acceptButtonText": "Got it",
    "policyUrl": "/privacy#cookies"
  },

  "breadcrumbs": {
    "enabled": true,
    "separator": "/"                           // Any character or HTML entity
  }
}

Navigation

Managed at Admin → Navigation. Stored in config/navigation.json. Defines the top navbar brand, link items, optional dropdown groups, visual variant, and action slots (e.g. theme selector).

{
  "brand": { "text": "My Site", "url": "/" },
  "items": [
    { "text": "Home", "url": "/" },
    { "text": "Blog", "url": "/blog" },
    { "text": "About", "url": "/about" },
    {
      "text": "More",
      "items": [
        { "text": "Contact", "url": "/contact" },
        { "text": "FAQ", "url": "/faq" }
      ]
    }
  ],
  "variant": "dark",
  "actions": [{ "type": "theme-selector" }]
}

Key details

  • Supports flat items and nested dropdown groups via a child items array.
  • variant accepts default, dark, or transparent.
  • actions is a slot array rendered to the right of the nav links. Currently supports theme-selector.
  • Mobile: collapses automatically to a hamburger menu — no additional configuration required.

Layout Presets

Managed in config/layouts.json. A layout preset controls which chrome (navbar, sidebar, footer, breadcrumbs) wraps a page's content.

Preset Navbar Sidebar Footer Breadcrumbs Notes
default Standard content pages
with-sidebar Auto (from h2s) Sidebar generated from page headings
minimal Great for landing pages
landing Full-width hero, no breadcrumbs

Per-page override — add a layout key to the page's frontmatter:

---
title: My Landing Page
layout: minimal
---

Custom layouts can be added to layouts.json and referenced by any page.

24 Themes (Light & Dark)

Domma CMS uses the Domma theme system with 24 built-in themes — 12 families, each with a dark and light variant. Set the active theme at Admin → Settings → Appearance. The default is charcoal-dark.

Theme Family Dark Variant Light Variant
Charcoal charcoal-dark Default charcoal-light
Ocean ocean-dark ocean-light
Forest forest-dark forest-light
Sunset sunset-dark sunset-light
Royal royal-dark royal-light
Lemon lemon-dark lemon-light
Silver silver-dark silver-light
Grayve grayve-dark grayve-light
Mint mint-dark mint-light
Christmas christmas-dark christmas-light
Unicorn unicorn-dark unicorn-light
Dreamy dreamy-dark dreamy-light

Per-Page Theme Override

Any page can override the site-wide theme using a theme key in its frontmatter. Only that page is affected — all other pages continue to use the site default.

---
title: My Landing Page
theme: ocean-dark
layout: landing
---

This is particularly useful for:

  • Seasonal pages — e.g. apply christmas-dark to a holiday promotion page
  • Campaign pages — match a campaign's brand palette without changing the site theme
  • Varied section aesthetics — give distinct visual identity to different areas of a site
  • Landing pages — pair with layout: landing for fully custom entry points

Theme Roller Plugin

The bundled Theme Roller plugin adds a visual theme customisation tool, accessible from the admin toolbar. It lets you fine-tune any theme without touching CSS source files.

Capabilities

  • Live preview — changes are applied instantly in the browser, no reload required
  • CSS variable overrides — tweak colours, spacing, radius, and typography tokens
  • Export custom theme — download your overrides as a standalone CSS file
  • Apply site-wide or per-page — exported CSS can be placed in config/custom.css or scoped with a page selector

Enable the plugin in config/plugins.json:

{ "slug": "theme-roller", "enabled": true }

Once enabled, a Theme Roller button appears in the admin toolbar on every public page when you are logged in.

Server Configuration

Server-level configuration is stored in a .env file at the project root. The CMS server reads this file via dotenv on startup. Never commit .env to version control.

PORT=4096
NODE_ENV=production
JWT_SECRET=auto-generated-by-setup

# Database (Pro only)
MONGO_URI=mongodb://localhost:27017/domma-cms

# SMTP (also configurable via Admin → Settings)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=you@example.com
SMTP_PASS=your-app-password
SMTP_FROM=noreply@yourdomain.com

Notes

  • JWT_SECRET is auto-generated during npx domma-cms init and should never be changed in production without invalidating all active sessions.
  • MONGO_URI is only required for the Pro edition. The standard edition uses a flat-file store.
  • SMTP values in .env take precedence over values set in config/site.json, allowing different credentials per environment.
  • Set NODE_ENV=production to enable minification, caching headers, and error suppression in responses.

Auth Configuration

Authentication behaviour is controlled by the auth key in config/site.json. These settings govern registration, session lifetimes, and brute-force protection.

{
  "auth": {
    "allowRegistration": false,         // Disable public sign-up (invite-only sites)
    "requireEmailVerification": false,  // Send verification email before login allowed
    "sessionTimeout": "7d",             // Sliding session window (e.g. 1h, 24h, 7d)
    "accessTokenExpiry": "15m",         // JWT access token lifetime
    "passwordMinLength": 8,             // Minimum characters for new passwords
    "maxLoginAttempts": 5,              // Failed attempts before lockout
    "lockoutDuration": "15m"            // How long a locked account remains locked
  }
}

Recommended production defaults

  • Set allowRegistration: false unless your site has a public user base — admin accounts are created via CLI on first run.
  • Keep accessTokenExpiry short (15 – 30 minutes) and rely on the sliding sessionTimeout for long-lived sessions.
  • maxLoginAttempts and lockoutDuration together mitigate credential-stuffing attacks without permanently blocking legitimate users.

Custom CSS

Inject additional CSS into every public page without modifying Domma's source files. This is the recommended way to apply brand-specific overrides.

How it works

  • Navigate to Admin → Settings → Custom CSS and paste your rules into the editor.
  • The content is saved to config/custom.css and served as a static file.
  • It is loaded after the theme CSS on every public page, giving it full specificity over theme variables.
  • The admin panel is not affected — custom CSS applies only to the public-facing site.

Example overrides

/* Override primary brand colour */
:root {
    --color-primary: #e63946;
}

/* Custom heading font weight */
h1, h2, h3 {
    font-weight: 800;
}

/* Hide the back-to-top button on the homepage */
body.page-home .back-to-top {
    display: none;
}

For larger style overrides, consider creating a dedicated stylesheet and linking it via a custom layout rather than accumulating rules in custom.css.