Configuration
Last updated
On this page
Every setting the CLI reads, with its default. This page tests JSON and YAML code, a wide table that has to scroll sideways on a phone, nested lists and a checklist.
The config file#
Create acme.config.json at the root of your project:
JSON
{
"workspace": "my-team",
"site": {
"handle": "acme",
"indexable": false,
"accent": "#2563eb"
},
"build": {
"include": ["docs/**/*.md"],
"exclude": ["docs/drafts/**"]
}
}The same settings in YAML, if you prefer it:
YAML
workspace: my-team
site:
handle: acme
indexable: false
accent: "#2563eb"
build:
include:
- docs/**/*.md
exclude:
- docs/drafts/**Every setting#
| Setting | Type | Default | Environment variable | Applies to | Notes |
|---|---|---|---|---|---|
workspace | string | none | ACME_WORKSPACE | every command | Required. The workspace's slug, not its display name. |
site.handle | string | the space's name, slugged | ACME_SITE_HANDLE | publish, preview | Three to thirty lowercase letters, numbers and single dashes. |
site.indexable | boolean | false | ACME_SITE_INDEXABLE | publish | Whether search engines may index the site. |
site.accent | colour | #2563eb | ACME_SITE_ACCENT | publish | Adjusted on the site so it stays readable in light and dark mode. |
build.include | glob list | ["**/*.md"] | none | publish, preview, check | Paths relative to the project root. |
build.exclude | glob list | [] | none | publish, preview, check | Applied after include. |
Precedence#
Settings are read in this order, later ones winning:
Defaults
The config file
acme.config.jsonat the project rootor
acme.config.yamlif there is no JSON file
Environment variables
Variables set in the shell
Variables from a
.envfile, which the CLI loads only when--env-fileis passed
Command-line flags
Before you publish#
The config file is at the project root
workspaceis setsite.handleis the address you wantYou previewed the release before making it live
Next: Publish your first site.