Api
Module Configuration
Reference for the tina config options in nuxt.config.ts.
Every module option is set under the tina key:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-tina'],
tina: {
clientId: process.env.NUXT_TINA_CLIENT_ID,
token: process.env.NUXT_TINA_TOKEN,
branch: 'main',
visualEditing: true,
media: {
publicFolder: 'public',
mediaRoot: 'uploads',
provider: 'tina',
},
enabled: true,
debug: false,
},
})
All options are optional. The module falls back to sane defaults, including reading credentials from the environment. See Installation & Setup for the env var list.
Options
| Option | Type | Default | Description |
|---|---|---|---|
clientId | string | NUXT_TINA_CLIENT_ID | TINA_CLIENT_ID env var | Your Tina Cloud client ID. |
token | string | NUXT_TINA_TOKEN | TINA_TOKEN env var | Tina Cloud read-only token (kept server-side only). |
branch | string | NUXT_TINA_BRANCH | HEAD env var, else 'main' | The Git branch content queries target. |
tinaPath | string | 'tina' | Where the Tina config folder lives, relative to the project root. |
visualEditing | boolean | true | Enables the client-side iframe postMessage bridge plugin. |
media.publicFolder | string | 'public' | The folder public web assets live in. |
media.mediaRoot | string | 'uploads' | The subfolder uploaded images are stored under. |
media.provider | 'tina' | 'cloudinary' | 'tina' | The media store backend. 'cloudinary' registers the /api/cloudinary/** route. See Media & Cloudinary. |
enabled | boolean | true | Disables the module entirely when false. |
debug | boolean | false | Logs bridge activity to the browser console: connections, received messages, and messages dropped for failing the origin check. |
Startup warnings
In development, the module checks for common misconfigurations and logs a warning when it finds one:
media.provideris'cloudinary', but a required Cloudinary environment variable is missing.tinaPathlooks like an absolute path instead of a relative one.
These checks never run in production, so they can't add noise to your production logs.