Configuration
Module options
export default defineNuxtConfig({
modules: ['@nuxt/content', 'nuxt-studio'],
studio: {
route: '/_studio',
repository: {
provider: 'github',
owner: 'your-org',
repo: 'your-repo',
branch: 'main',
rootDir: 'docs',
private: true,
},
editor: {
components: {
include: ['Content*', 'Landing*'],
exclude: ['content/prose/**'],
groups: [
{ label: 'Content', include: ['content*'] },
{ label: 'Landing', include: ['landing*'] },
],
ungrouped: 'include',
},
iconLibraries: ['lucide'],
commands: {
exclude: ['video'],
},
},
git: {
commit: { messagePrefix: 'content:' },
},
},
})Use dev: false when testing the production authentication flow locally. Repository metadata is auto-detected on Vercel, Netlify, GitHub Actions, and GitLab CI; CI-detected values take precedence over manual values.
OAuth providers
Studio's current runtime configuration uses the NUXT_STUDIO_AUTH_ prefix.
# GitHub
NUXT_STUDIO_AUTH_GITHUB_CLIENT_ID=<client-id>
NUXT_STUDIO_AUTH_GITHUB_CLIENT_SECRET=<client-secret>
# GitLab
NUXT_STUDIO_AUTH_GITLAB_APPLICATION_ID=<application-id>
NUXT_STUDIO_AUTH_GITLAB_APPLICATION_SECRET=<application-secret>
# Google authentication plus a Git token for publishing
NUXT_STUDIO_AUTH_GOOGLE_CLIENT_ID=<client-id>
NUXT_STUDIO_AUTH_GOOGLE_CLIENT_SECRET=<client-secret>
NUXT_STUDIO_AUTH_GOOGLE_MODERATORS=editor@example.com
NUXT_STUDIO_GIT_GITHUB_TOKEN=<fine-grained-token>GitHub and GitLab OAuth can publish with the provider token. Google authenticates the editor but needs a separate GitHub or GitLab token with repository content write access. Use provider moderator lists when access must be narrower than the OAuth application's audience; Google requires a moderator list.
Callbacks use /__nuxt_studio/auth/<provider>. Match the OAuth application's callback to the deployed origin, and use the provider's redirect environment variable only when a proxy or custom origin requires it.
For GitHub Enterprise or self-hosted GitLab, set repository.instanceUrl or the matching provider instance environment variable.
Schema-driven inputs
Studio reads the Nuxt Content collection schema. Use Content's current property(...).editor(...) metadata for specialized controls.
import { defineCollection, defineContentConfig, property } from '@nuxt/content'
import { z } from 'zod/v4'
export default defineContentConfig({
collections: {
pages: defineCollection({
type: 'page',
source: '**',
schema: z.object({
cover: property(z.string()).editor({ input: 'media' }),
icon: property(z.string()).editor({
input: 'icon',
iconLibraries: ['lucide'],
}),
}),
}),
},
})Checks
- The Nuxt config contains
nuxt-studio, while collection schemas remain incontent.config.ts. - OAuth credentials use the environment names shipped by the installed Studio version.
- The callback origin, Studio route, Git repository, and deployment branch agree.
- Component filters match component names or paths actually generated by Nuxt.
Official references: setup, Git providers, auth providers.