Configuration

Understand how build-time and runtime options work together in Nuxtify.

Two Places to Configure Nuxtify

Nuxtify splits configuration cleanly between nuxt.config.ts and app.config.ts:

  • nuxt.config.ts (nuxtifyCms, nuxtifyPages, or nuxtifyCore) — best for build-time options that affect route registration, sitemap rules, and module setup.
  • app.config.ts (under the nuxtify key) — best for runtime branding, navigation, announcement bars, footer credits, and email addresses.

At startup, Nuxtify merges both sources with defu into appConfig.nuxtify, with values in app.config.ts taking precedence over module defaults.

Smart Defaults Out of the Box

Every Nuxtify module ships with sensible defaults, so you only need to configure the options you want to change.

The one important rule to keep in mind when customizing @nuxtify/cms:

Starter Example

Here's a minimal real-world pair of nuxt.config.ts and app.config.ts files (modeled on nuxtify.dev itself):

nuxt.config.ts

export default defineNuxtConfig({
  modules: [
    '@nuxt/content',
    '@nuxtify/cms',
  ],

  site: {
    url: 'https://example.com',
    name: 'Acme',
    description: 'Fast product sites powered by Nuxtify.',
  },

  // Only configure the build-time options you want to change
  nuxtifyCms: {
    content: {
      articles: { enabled: false },
      contributors: { enabled: false },
      topics: { enabled: false },
    },
  },
})

app/app.config.ts

export default defineAppConfig({
  nuxtify: {
    brand: {
      name: 'Acme',
      domain: 'example.com',
      tagline: 'Ship faster with Nuxt and Vuetify.',
      logo: {
        lightUrl: '/img/logo-light.png',
        darkUrl: '/img/logo-dark.png',
        width: 200,
        height: 40,
      },
    },

    navigation: {
      primary: [
        { text: 'Features', to: '/features' },
        { text: 'Docs', to: '/docs' },
      ],
      secondary: [
        { text: 'Get Started', to: '/docs/getting-started/installation' },
      ],
      altPrimary: [
        {
          title: 'Product',
          links: [
            { text: 'Features', to: '/features' },
            { text: 'Docs', to: '/docs' },
          ],
        },
      ],
    },

    email: {
      general: 'hello@example.com',
      support: 'support@example.com',
    },
  },
})

Reading Configuration at Runtime

Use the auto-imported useNuxtifyConfig() composable anywhere in your app's components, pages, or composables to read the merged, fully-typed configuration:

<script setup lang="ts">
const nuxtify = useNuxtifyConfig()
</script>

<template>
  <span>{{ nuxtify.brand?.name }}</span>
</template>

Because Nuxtify is written in TypeScript, you get full IntelliSense and autocomplete inside nuxt.config.ts, app.config.ts, and useNuxtifyConfig().

Full Option References

Dive into every available option and default value for each module: