You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,114 +13,68 @@ This documentation covers only the new open-source Nuxt Studio module.
13
13
Click here to view the documentation for the legacy standalone platform.
14
14
::
15
15
16
-
## Install
16
+
## Installation
17
17
18
-
Add the Nuxt Studio module to your project:
18
+
Install Nuxt Studio using the Nuxt CLI within your project:
19
19
20
-
::code-group
21
-
```bash [pnpm]
22
-
pnpm add nuxt-studio@alpha
20
+
```bash [Terminal]
21
+
npx nuxt module add nuxt-studio@alpha
23
22
```
24
23
25
-
```bash [npm]
26
-
npm install nuxt-studio@alpha
27
-
```
24
+
::tip{icon="i-lucide-rocket"}
25
+
Start your development server and start editing your Nuxt Content website.
26
+
::
28
27
29
-
```bash [yarn]
30
-
yarn add nuxt-studio@alpha
31
-
```
28
+
## Development mode
32
29
33
-
```bash [bun]
34
-
bun add nuxt-studio@alpha
35
-
```
36
-
::
30
+
When running locally, **any file changes will be synchronized in real time with your local filesystem**.
37
31
38
-
Alternatively, use the Nuxt CLI to automatically add the module:
32
+
The publish system is only available in production mode. Use your current workflow (git command, IDE, GitHub Desktop...) to commit your changes.
39
33
40
-
```bash [Terminal]
41
-
npx nuxi module add nuxt-studio@alpha
42
-
```
34
+
## Production mode
43
35
44
-
## Configure
36
+
While Nuxt Studio can be useful during development (especially with the upcoming Studio editor) its main advantage is the ability to publish changes directly from your production website.
45
37
46
-
Add the module to your `nuxt.config.ts` and configure your repository based on your Git provider:
38
+
In order to publish changes in production, you need to configure the git repository:
47
39
48
40
```ts [nuxt.config.ts]
49
41
exportdefaultdefineNuxtConfig({
50
-
modules: [
51
-
'@nuxt/content',
52
-
'nuxt-studio'
53
-
],
54
-
55
42
studio: {
56
-
// Studio admin route (default: '/_studio')
57
-
route: '/_studio',
58
-
59
43
// Git repository configuration (owner and repo are required)
60
44
repository: {
61
45
provider: 'github', // 'github' or 'gitlab'
62
46
owner: 'your-username', // your GitHub/GitLab username or organization
63
47
repo: 'your-repo', // your repository name
64
-
branch: 'main', // the branch to commit to (default: main)
65
-
}
66
-
}
67
-
})
68
-
```
69
-
70
-
### Repository Options
71
-
72
-
#### Root directory `default: ''`
73
-
74
-
If your Nuxt Content application is in a monorepo or subdirectory, specify the `rootDir` option to point to the correct location.
75
-
76
-
```ts [nuxt.config.ts]
77
-
exportdefaultdefineNuxtConfig({
78
-
studio: {
79
-
repository: {
80
-
...
81
-
rootDir: 'docs'
82
-
}
83
-
}
84
-
})
85
-
```
86
-
87
-
#### Private Repository Access `default: true`
88
-
89
-
By default, Studio requests access to both public and private repositories.
90
-
91
-
Setting `private: false` limits the OAuth scope to public repositories only, which may be preferable for security or compliance reasons when working with public repositories.
92
-
93
-
```ts [nuxt.config.ts]
94
-
exportdefaultdefineNuxtConfig({
95
-
studio: {
96
-
repository: {
97
-
...
98
-
private: false
48
+
branch: 'main', // the branch to commit to (default: 'main')
99
49
}
100
50
}
101
51
})
102
52
```
103
53
104
-
## Dev mode
54
+
::callout{to="#options"}
55
+
Read more about all the available options.
56
+
::
105
57
106
-
🚀 That’s all you need to enable Studio in local.
58
+
### OAuth Configuration
107
59
108
-
Once your project is running locally, any file changes will be synchronized in real time with the file system.
60
+
To enable this Nuxt Studio supports authentication through both GitHub and GitLab OAuth providers allowing you to log in and publish updates from production.
109
61
110
-
::warning
111
-
The publish system is only available in production mode. You can use your classical workflow (IDE, CLI, GitHub Desktop...) to publish your changes in local.
Follow the setup instructions for your Git provider.
112
64
::
113
65
114
-
## Production mode
66
+
Once your OAuth app is setup, you should have your environment variables set in your hosting provider.
115
67
116
-
While Nuxt Studio can be useful during development (especially with the upcoming Studio editor) its main advantage is the ability to publish changes directly from your production website.
117
-
118
-
### OAuth Configuration
119
-
120
-
To enable this Nuxt Studio supports authentication through both GitHub and GitLab OAuth providers allowing you to log in and publish updates from production.
After deployment, access the Studio interface by navigating to your configured route (default: `/_studio`):
103
+
Once deployed, open Studio by navigating to your configured route (default: `/_studio`):
150
104
151
105
1. Click the login button if it does not directly redirect to the OAuth app authorization page
152
106
2. Authorize the OAuth application
153
107
3. You'll be redirected back to Studio ready to edit your content
154
108
155
-
::note
156
-
Secure OAuth-based login with **Google** should be available quickly in the Beta release.
109
+
::tip
110
+
You can also use the shortcut `CMD` + `.` to redirect to the Studio route.
157
111
::
158
112
159
-
::tip
160
-
You can also use the shortcut `CMD` + `K` to redirect to the Studio route.
113
+
::note
114
+
OAuth-based login with **Google** will be available soon.
161
115
::
162
116
163
-
## Internationalization
117
+
## Options
118
+
119
+
Add the module to your `nuxt.config.ts` and configure your repository based on your Git provider:
120
+
121
+
### Admin route
122
+
123
+
Customize the login route using the `route` option:
124
+
125
+
```ts [nuxt.config.ts]
126
+
exportdefaultdefineNuxtConfig({
127
+
studio: {
128
+
route: '/admin', // default: '/_studio'
129
+
}
130
+
})
131
+
```
132
+
133
+
### Repository
134
+
135
+
Use the `repository` option to specify your git repository to sync in production mode.
136
+
137
+
```ts [nuxt.config.ts]
138
+
exportdefaultdefineNuxtConfig({
139
+
studio: {
140
+
repository: {
141
+
provider: 'github', // 'github' or 'gitlab', default: 'github'
142
+
owner: 'your-username', // your GitHub/GitLab username or organization
143
+
repo: 'your-repo', // your repository name
144
+
branch: 'main', // the branch to commit to (default: main)
145
+
}
146
+
}
147
+
})
148
+
```
149
+
150
+
#### Root directory `default: ''`
151
+
152
+
If your Nuxt Content application is in a monorepo or subdirectory, specify the `rootDir` option to point to the correct location.
153
+
154
+
```ts [nuxt.config.ts]
155
+
exportdefaultdefineNuxtConfig({
156
+
studio: {
157
+
repository: {
158
+
...
159
+
rootDir: 'docs'
160
+
}
161
+
}
162
+
})
163
+
```
164
+
165
+
#### Private Repository Access `default: true`
166
+
167
+
By default, Studio requests access to both public and private repositories.
168
+
169
+
Setting `private: false` limits the OAuth scope to public repositories only, which may be preferable for security or compliance reasons when working with public repositories.
170
+
171
+
```ts [nuxt.config.ts]
172
+
exportdefaultdefineNuxtConfig({
173
+
studio: {
174
+
repository: {
175
+
...
176
+
private: false
177
+
}
178
+
}
179
+
})
180
+
```
181
+
182
+
### Internationalization
164
183
165
184
Nuxt Studio includes built-in internationalization support with the following languages available:
166
185
167
186
- 🇬🇧 **English** (default)
168
187
- 🇫🇷 **French**
169
188
170
-
### Configuration
171
-
172
-
Set your preferred language in your `nuxt.config.ts`:
189
+
Set your preferred language using the `i18n` option:
173
190
174
191
```ts [nuxt.config.ts]
175
192
exportdefaultdefineNuxtConfig({
@@ -187,6 +204,20 @@ This will translate:
187
204
- Monaco editor snippets and code completion
188
205
- Contextual messages and notifications
189
206
190
-
### Contributions
207
+
::callout{icon="i-lucide-heart-handshake"}
208
+
Community contributions for new language translations are welcome! If you'd like to add support for a new language, please visit the [GitHub repository](https://github.com/nuxt-content/studio) and drop a pull request.
209
+
::
210
+
211
+
### Dev mode
212
+
213
+
If you want to use test locally your production setup, disable the `dev` option:
214
+
215
+
```ts [nuxt.config.ts]
216
+
exportdefaultdefineNuxtConfig({
217
+
studio: {
218
+
dev: false
219
+
}
220
+
})
221
+
```
191
222
192
-
Community contributions for new language translations are welcome! If you'd like to add support for a new language, please visit the [GitHub repository](https://github.com/nuxt-content/studio) and drop a pull request 💚
223
+
Make sure to create another GitHub/GitLab OAuth app that redirects to your local dev server (usually <http://localhost:3000>).
That's it! Once deployed with the appropriate credentials set as environment variables. Studio will be accessible from your production instance. Just login on the `/_studio` (or on the route you've configured) to start editing.
47
+
::
48
+
49
+
## GitLab
54
50
55
51
To use GitLab as your Git provider, you need to create a GitLab OAuth application.
56
52
@@ -79,8 +75,8 @@ After creating the OAuth application, you'll receive:
79
75
Add the GitLab OAuth credentials to your deployment platform's environment variables or in your `.env` file in local
0 commit comments