Index of every page on this site: llms.txt

Site config resolves from the following sources, in order of precedence:

Build Time

1. System

System details relate to the environment the app is running in.

export default {
  env: import.meta.envName || process.env.NODE_ENV,
}

If you do not set indexable, the resolved config derives it from env: true when env is 'production', else false.

2. Vendor CI Environment

When deploying to supported platforms, url and name are automatically populated from platform environment variables. These have low priority and are overridden by any explicit config you provide.

Platformurlname
VercelVERCEL_URL, NUXT_ENV_VERCEL_URLNUXT_ENV_VERCEL_GIT_REPO_SLUG
NetlifyURLSITE_NAME
Cloudflare PagesCF_PAGES_URL
As of v4, site.name is no longer inferred from your project directory or package.json. It will only be auto-populated from CI platform env vars listed above, or from explicit config. See the v4 release notes.
  1. Module overrides: Build time site config that modules set with updateSiteConfig() from nuxt-site-config/kit.
  2. Nuxt Config site key: Site config provided by the user in the Nuxt config.
  3. Nuxt Hook: updateSiteConfig() calls in the site-config:resolve hook.
  4. I18n: url from i18n.baseUrl and the default locale.
  5. Runtime Config and Environment Variables: runtimeConfig.public.site and the NUXT_SITE_* environment variables (e.g. NUXT_SITE_URL, NUXT_SITE_NAME), first at build time, then at runtime.

A build time updateSiteConfig() call without a _priority ranks with the site key (SiteConfigPriority.config). To rank an entry differently, pass _priority with a SiteConfigPriority value.

SSR / Nitro Runtime

  1. Request URL: The request URL determines the site URL at runtime.
  2. Build Time Site Config: Config resolved in the build step, stored on runtimeConfig['nuxt-site-config'].stack.
  3. Route Rules: Config resolved from the route rules of the request path, the site key. This allows for multi-site support.

CSR Runtime

In CSR, the browser hydrates site config directly from the SSR-rendered payload sent by the server. This ensures the client has the same config as the server without any hydration mismatches.

Was this page helpful?