The CWA is in heavy development
The CWA is still in alpha and not ready for production - some code and implementations are likely to change. If you would like to try out the CWA, please enjoy what we have provided and feel free to provide feedback, or get involved on GitHub.
DraftCwa Api

cwa.siteConfig

Site-wide settings persisted in the API and cached in the Pinia store.

Site-wide settings persisted in the API and cached in the Pinia store.

cwa.siteConfig.config           // SiteConfigParams — reactive, read properties directly (no .value)
cwa.siteConfig.savedSiteConfig  // the server-persisted config (before any unsaved changes)
cwa.siteConfig.isLoading        // boolean

// Load or refresh from the API
await cwa.siteConfig.loadConfig()

// Save changed keys
await cwa.siteConfig.saveConfig({
    siteName: 'My New Site Name',
    indexable: false
})

Saving

Only keys whose value differs from savedSiteConfig are sent, one request per key — POST /_/site_config_parameters for a key that has never been set, PATCH /_/site_config_parameters/{key} otherwise. saveConfig resolves to { totalConfigsChanged }.

saveConfig no-ops (returning totalConfigsChanged: 0) if a previous save is still in flight or the config hasn't been loaded yet. A sitemapXml value is validated as XML before anything is sent — an invalid document aborts the whole save.

Config Keys

SiteConfigParams — passing any other key will POST an unknown parameter to the API.

KeyType
siteNamestring
fallbackTitleboolean
concatTitleboolean
canonicalUrlstring
indexableboolean
robotsTextstring
robotsAllowNonSeoCrawlersboolean
robotsAllowAiBotsboolean
robotsRemoveSitemapboolean
sitemapEnabledboolean
sitemapXmlstring
maintenanceModeEnabledboolean