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
Copy file name to clipboardexpand all lines: docs/content/blog/ui-pro-docs-migration.md
+48-36
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Migrate Nuxt UIPro Documentation Starter
2
+
title: Migrate Nuxt UI Pro Documentation Starter
3
3
description: How to upgrade your Nuxt UI Pro documentation to Content and UIPro v3
4
4
image:
5
5
src: /blog/migrate-docs-starter.png
@@ -14,15 +14,15 @@ category: Migration
14
14
draft: true
15
15
---
16
16
17
-
# How to upgrade your Nuxt UI Pro docs website to Content and UI v3
17
+
# How to upgrade your Nuxt documentation website to Content x UI v3
18
18
19
19
**2025 kicks off with the power of 3!**
20
20
21
21
This start of year is marked by major updates to our favorite tools. The UI team is about to launch **version 3** of the **UI / UI Pro libraries** (currently in alpha), while the Content team has already released **Nuxt Content v3**.
22
22
23
23
These updates mean that all our starter templates combining **Content** and **UI** will need to be updated to align with the latest versions. To help you make the transition, this guide walks through migrating the **Nuxt UI Pro Docs Starter** to the new **Content v3 and Nuxt UI v3** packages.
#### Docs page data and surround fetching can be updated and mutualised by moving from `queryContent` to `queryCollection` and `queryCollectionItemSurroundings` methods
@@ -248,26 +245,25 @@ This is a migration case, it won't cover all breaking changes introduced by the
248
245
### 1. Setup package to v3
249
246
250
247
::prose-note
251
-
To maintain consistency with the UI versioning, which transitioned from v1 to v2. The Nuxt UIPro version 2 is being skipped, and the update jumps directly to v3.
248
+
To maintain consistency with the UI versioning, which transitioned from v1 to v2. The Nuxt UI Pro version 2 is being skipped, and the update jumps directly to v3.
252
249
::
253
250
254
251
::prose-steps{level="4"}
255
-
256
252
#### Install the Nuxt UI v3 alpha package
257
253
258
254
:::code-group{sync="pm"}
259
255
```bash [pnpm]
260
256
pnpm add @nuxt/ui-pro@next
261
257
```
262
-
258
+
263
259
```bash [yarn]
264
260
yarn add @nuxt/ui-pro@next
265
261
```
266
-
262
+
267
263
```bash [npm]
268
264
npm install @nuxt/ui-pro@next
269
265
```
270
-
266
+
271
267
```bash [bun]
272
268
bun add @nuxt/ui-pro@next
273
269
```
@@ -283,7 +279,7 @@ It's no longer required to add `@nuxt/ui` in modules as it is automatically impo
283
279
modules: ['@nuxt/ui-pro']
284
280
})
285
281
```
286
-
282
+
287
283
```ts [nuxt.config.ts (v1)]
288
284
exportdefaultdefineNuxtConfig({
289
285
extends: ['@nuxt/ui-pro'],
@@ -487,7 +483,6 @@ This decision was made because components used in Markdown no longer need to be
That's it! The docs starter is now fully running on both UI and Content v3 🎉 You check out the source code on GitHub.
661
+
That's it! The docs starter is now fully running on both UI and Content v3 🎉
668
662
::
669
663
670
-
## Bonus: Edit on Studio
664
+
## Edit on Studio
665
+
666
+
If you're using Nuxt Studio to edit your documentation you also need to migrate the related code.
667
+
668
+
The Studio module has been deprecated and a new generic `Preview API` has been implemented directly into Nuxt Content, you can remove the `@nuxthq/studio` package from your dependencies and from the`nuxt.config.ts` modules. Instead you just need to enable the preview mode in the Nuxt configuration file by binding the Studio API.
669
+
670
+
```ts [nuxt.config.ts]
671
+
exportdefaultdefineNuxtConfig({
672
+
content: {
673
+
preview: {
674
+
api: 'https://api.nuxt.studio'
675
+
}
676
+
},
677
+
})
678
+
```
679
+
680
+
In order to keep the app config file updatable from Studio you need to update the helper import of the `nuxt.schema.ts` file from `@nuxthq/studio/theme` to `@nuxt/content/preview`.
0 commit comments