Skip to content

Commit 1cc271c

Browse files
committed
chore(playground): update architecture
1 parent d489b96 commit 1cc271c

File tree

14 files changed

+793
-2
lines changed

14 files changed

+793
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
title: Getting Started
1+
title: Docus
22
icon: false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: MDC
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

playground/docus/content/2.essentials/.navigation.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: Studio
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Introduction
3+
description: Learn what the new Nuxt Studio module is and how it differs from the previous hosted platform.
4+
seo:
5+
title: Learn about the Nuxt Studio Open Source Module
6+
description: Nuxt Studio has evolved into an open-source Nuxt module that you can self-host alongside your Nuxt Content website.
7+
navigation:
8+
title: Introduction
9+
icon: i-lucide-info
10+
---
11+
12+
## The new Nuxt Studio module
13+
14+
When NuxtLabs joined Vercel, the team promised to release [nuxt.studio](https://nuxt.studio) as a free open-source, self-hosted module for Nuxt projects.
15+
16+
That promise is now fulfilled. Thanks to vercel support the first version of the **Nuxt Studio module** is available.
17+
18+
You can now enable **content editing directly in production**, with real-time preview and GitHub integration, all from within your own Nuxt application.
19+
20+
::prose-note
21+
**Alpha Release**
22+
23+
:br
24+
25+
The current version includes a Monaco code editor for Markdown, YAML, and JSON files. The visual Notion-like editor will be available in the beta release.
26+
::
27+
28+
## How does it differ from the standalone platform?
29+
30+
Originally offered as a hosted platform at [nuxt.studio](https://nuxt.studio), Studio has evolved into an open-source Nuxt module that you can deploy alongside your Nuxt Content website.
31+
32+
This means content editors can manage and update content directly in production, without needing local development tools or Git knowledge.
33+
34+
### Key differences
35+
36+
-**Self-hosted** — runs entirely on your own infrastructure
37+
-**No external dependencies** — no APIs or third-party services required
38+
-**Free and open-source** — released under the MIT license
39+
-**Built-in integration** — works within your Nuxt app
40+
41+
::warning
42+
The new Nuxt Studio module requires a server-side route for authentication.
43+
While static generation remains supported, your site must be **deployed on a platform that supports server-side rendering (SSR)**.
44+
::
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
title: Setup
3+
description: Learn how to install and configure Nuxt Studio to edit your content in production with GitHub authentication.
4+
navigation:
5+
title: Setup
6+
icon: i-lucide-settings
7+
seo:
8+
title: Nuxt Studio Setup Guide
9+
description: Learn how to install and configure the self-hosted Nuxt Studio module for your Nuxt Content website. Edit content in production with GitHub authentication.
10+
---
11+
12+
::tip{to="https://nuxt.studio/docs/setup"}
13+
This documentation covers only the new open-source Nuxt Studio module.
14+
Click here to view the documentation for the legacy standalone platform.
15+
::
16+
17+
## Install
18+
19+
Add the Nuxt Studio module to your project:
20+
21+
::code-group
22+
```bash [pnpm]
23+
pnpm add nuxt-studio
24+
```
25+
26+
```bash [npm]
27+
npm install nuxt-studio
28+
```
29+
30+
```bash [yarn]
31+
yarn add nuxt-studio
32+
```
33+
34+
```bash [bun]
35+
bun add nuxt-studio
36+
```
37+
::
38+
39+
Alternatively, use the Nuxt CLI to automatically add the module:
40+
41+
```bash
42+
npx nuxi module add nuxt-studio
43+
```
44+
45+
## Configure
46+
47+
Add the module to your `nuxt.config.ts` and configure your GitHub repository:
48+
49+
```ts [nuxt.config.ts]
50+
export default defineNuxtConfig({
51+
modules: [
52+
'@nuxt/content',
53+
'nuxt-studio'
54+
],
55+
56+
studio: {
57+
// Studio admin route (default: '/_studio')
58+
route: '/_studio',
59+
60+
// GitHub repository configuration (required)
61+
repository: {
62+
provider: 'github', // only GitHub is currently supported
63+
owner: 'your-username', // your GitHub username or organization
64+
repo: 'your-repo', // your repository name
65+
branch: 'main', // the branch to commit to
66+
rootDir: '' // optional: if your Nuxt app is in a subdirectory
67+
}
68+
}
69+
})
70+
```
71+
72+
::prose-tip
73+
If your Nuxt Content application is in a monorepo or subdirectory, specify the `rootDir` option to point to the correct location.
74+
::
75+
76+
## Create GitHub OAuth App
77+
78+
Nuxt Studio uses GitHub OAuth for authentication.
79+
80+
::prose-steps
81+
> If you changed the `route` option in your config, update the callback URL accordingly (the route set instead of `/studio`)
82+
83+
### Navigate to GitHub Developer Settings
84+
85+
Go to [GitHub Developer Settings](https://github.com/settings/developers) and click **New OAuth App**
86+
87+
### Configure the OAuth Application
88+
89+
Fill in the required fields:
90+
91+
- **Application name**: Your app name
92+
- **Homepage URL**: Your production website homepage URL
93+
- **Authorization callback URL**: `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`.]
94+
95+
### Copy Your Credentials
96+
97+
After creating the OAuth app, you'll receive:
98+
99+
- A **Client ID** (visible immediately)
100+
- A **Client Secret** (click **Generate a new client secret**)
101+
102+
### Set your environment Variables
103+
104+
Add the GitHub OAuth credentials to your deployment platform's environment variables or in your `.env` file in local
105+
106+
```bash [.env]
107+
STUDIO_GITHUB_CLIENT_ID=your_github_client_id
108+
STUDIO_GITHUB_CLIENT_SECRET=your_github_client_secret
109+
```
110+
::
111+
112+
## Deployment
113+
114+
::warning
115+
The new Nuxt Studio module requires a server-side route for authentication.
116+
While static generation remains supported with [Nuxt hybrid rendering](https://nuxt.com/docs/4.x/guide/concepts/rendering#route-rules), your site must be **deployed on a platform that supports server-side rendering (SSR)**.
117+
::
118+
119+
### Accessing Studio
120+
121+
After deployment, access the Studio interface by navigating to your configured route (default: `/_studio`):
122+
123+
1. Click **Login with GitHub** if it does not directly redirect to the OAuth app authorization page
124+
2. Authorize the OAuth application
125+
3. You'll be redirected back to Studio, ready to edit your content
126+
127+
::prose-note
128+
Secure OAuth-based login with **Google** should be available quickly in the Beta release.
129+
::
130+
131+
## Development mode
132+
133+
Nuxt Studio includes an **experimental** development mode that enables real-time file system synchronization:
134+
135+
```ts [nuxt.config.ts]
136+
export default defineNuxtConfig({
137+
studio: {
138+
development: {
139+
sync: true // Enable development mode
140+
}
141+
}
142+
})
143+
```
144+
145+
When enabled, Nuxt Studio will:
146+
147+
- ✅ Write changes directly to your local `content/` directory
148+
- ✅ Write media changes to your local `public/` directory
149+
- ❌ Listen for file system changes and update the editor
150+
- ❌ Commit changes to your repository (use your classical workflow instead)

0 commit comments

Comments
 (0)