Add the Nuxt Studio module to your project:
pnpm add nuxt-studio
npm install nuxt-studio
yarn add nuxt-studio
bun add nuxt-studio
Alternatively, use the Nuxt CLI to automatically add the module:
npx nuxi module add nuxt-studio
Add the module to your nuxt.config.ts and configure your GitHub repository:
export default defineNuxtConfig({
modules: [
'@nuxt/content',
'nuxt-studio'
],
studio: {
// Studio admin route (default: '/_studio')
route: '/_studio',
// GitHub repository configuration (required)
repository: {
provider: 'github', // only GitHub is currently supported
owner: 'your-username', // your GitHub username or organization
repo: 'your-repo', // your repository name
branch: 'main', // the branch to commit to
rootDir: '' // optional: if your Nuxt app is in a subdirectory
}
}
})
rootDir option to point to the correct location.Nuxt Studio uses GitHub OAuth for authentication.
If you changed the
routeoption in your config, update the callback URL accordingly (the route set instead of/studio)
Go to GitHub Developer Settings and click New OAuth App
Fill in the required fields:
https://yourdomain.com/_studio/auth/github:tip If you want to try studio on project running in local, you can simply set the callback url to your local url http://localhost:3000.After creating the OAuth app, you'll receive:
Add the GitHub OAuth credentials to your deployment platform's environment variables or in your .env file in local
STUDIO_GITHUB_CLIENT_ID=your_github_client_id
STUDIO_GITHUB_CLIENT_SECRET=your_github_client_secret
After deployment, access the Studio interface by navigating to your configured route (default: /_studio):
Nuxt Studio includes an experimental development mode that enables real-time file system synchronization:
export default defineNuxtConfig({
studio: {
development: {
sync: true // Enable development mode
}
}
})
When enabled, Nuxt Studio will:
content/ directorypublic/ directory