Site.json config file Last updated: 26. Apr 2026
Configuration reference for site.json – controls minification, HTTP headers and URL rules per site.
Configuration file placed at the root of a site (#/site.json). Provides control over minification, HTTP headers and URL rules per site.
Structure
File #/site.json
{
"urls": {
"cleanUrls": false
},
"headers": {
"X-Custom-Header": "verdi"
},
"minify": {
"enabled": true,
"provider": "nuglify",
"js": true,
"css": true,
"html": true,
"settings": {
"html": { ... },
"js": { ... },
"css": { ... }
}
}
}
All sections are optional. Missing sections mean default behaviour is preserved.
headers
Key/value pairs added as HTTP headers on all responses from the site. In case of conflict with existing headers, site.json wins.
minify
enabled(bool, default:false) – Enables minification via the selected provider. Whenfalse, legacy compression is used (as before).provider(string, default:"zeta") –"zeta"or"nuglify".js(bool, default:true) – Minify JavaScript (requires NUglify).css(bool, default:true) – Minify CSS (requires NUglify).html(bool, default:false) – Minify HTML.settings(object) – Provider-specific settings (see below).
Note: JS and CSS are currently only minified for the HTML pipeline. Standalone JS/CSS files go through the binary path and are not yet supported.
settings (NUglify)
Three optional subsections – html, js and css – mapped directly to NUglify's settings classes. Unknown properties are ignored; missing properties receive NUglify defaults.
Without settings, NUglify's standard defaults are used.
{
"settings": {
"html": {
"removeAttributeQuotes": false,
"removeOptionalTags": false,
"minifyJs": false,
"minifyCss": false
},
"js": {
"preserveImportantComments": true
},
"css": {
"commentMode": "Important"
}
}
}
A full list of available properties can be found in the NUglify documentation for HtmlSettings, CodeSettings and CssSettings.
Examples
NUglify with defaults:
{
"minify": { "enabled": true, "provider": "nuglify", "html": true }
}
NUglify with custom settings:
{
"minify": {
"enabled": true,
"provider": "nuglify",
"html": true,
"settings": {
"html": { "removeOptionalTags": true },
"js": { "preserveImportantComments": false }
}
}
}
Behaviour without site.json
Existing sites without site.json are completely unaffected. All behaviour is identical to before, and HTML is compressed with Zeta as the legacy provider.
For HTTP headers and security policy, see Security Headers in the headers.json file. For workspace-wide assets and the home page, see The "Root" folder.
<!-- task7-seealso -->