enabledbooleantrueWhether the site config is enabled.
debugbooleanfalseWhether the debug mode of the site config is enabled.
multiTenancy{ hosts: string[]; config: SiteConfigInput }[][]Configure multiple sites with different configurations based on the host. Each site configuration requires:
hosts: An array of hostnames that should use this configurationconfig: The site configuration to use when the hostname matchesexport default defineNuxtConfig({
site: {
multiTenancy: [
{
hosts: ['www.example.com', 'example.com', 'local.example.com'],
config: {
name: 'Example',
description: 'Example description',
url: 'example.com',
defaultLocale: 'en',
currentLocale: 'en',
},
},
{
hosts: ['www.foo.com', 'foo.com', 'local.foo.com'],
config: {
url: 'foo.com',
name: 'Foo',
description: 'Foo description',
},
},
]
}
})
urlstringThe canonical site URL.
envstringprocess.env.NODE_ENVThe environment the site is running in.
See this issue on why we can't use process.env.NODE_ENV.
namestringThe name of the site.
indexablebooleansiteConfig.env === 'production' || process.env.NODE_ENV === 'production'Can the site be indexed by search engines.
trailingSlashbooleanfalseWhether to add trailing slashes to the URLs.
defaultLocalestringThe default locale of the site.