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/docs/1.getting-started/4.migration.md
+14-7
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Don't worry, you don't need to modify your content files, We made sure that Cont
9
9
10
10
## Changes
11
11
12
-
Here is the list of breaking changes in Content v3:
12
+
### Query/Find Contents
13
13
14
14
-`queryContent()` API is replaced with new `queryCollection()`
15
15
- New API is backed by SQL
@@ -19,18 +19,25 @@ Here is the list of breaking changes in Content v3:
19
19
- Document driven mode is fully dropped, meaning:
20
20
- Markdown files will not convert to Nuxt pages automatically, you need to create pages, see [how](/docs/components/content-renderer#example)
21
21
-`useContent()` composable is removed
22
-
- We simplified rendering components.
23
-
-`<ContentDoc>`, `<ContentList>`, `<ContentNavigation>` and `<ContentQuery>` components are dropped in v3.
24
-
-`_dir.yml` files are renamed to `.navigation.yml`
25
-
- Multi source is dropped in favor of multi collection.
26
-
- Document `._path` is now renamed to `.path`
27
22
-`searchContent()` is dropped in favor of new api `queryCollectionSearchSections`
28
23
- Full text search can easily be done using this API See [Full-Text Search Snippets](/docs/advanced/fulltext-search)
29
-
-`useContentHelpers()` is removed
24
+
25
+
### Rendering Components
26
+
27
+
- Every content should be rendered using `<ContentRenderer>` component. `<ContentDoc>`, `<ContentList>`, `<ContentNavigation>` and `<ContentQuery>` components are dropped in v3.
28
+
-`<ContentSlot>` and `<MDCSlot>` components are not supported in v3. Instead components can simply use Vue's native `<slot>` component.
29
+
- One of the main reasons for existance of `<ContentSlot>` and `<MDCSlot>` was to manipulate content before rendering and removing wrapping paragraphs from slot content. This unwrapping behavior is now supported via `mdc-unwrap` attribute in `<slot>` component. example: `<slot mdc-unwrap="p" />`
30
30
- We consolidated the `ProsePre`, `ProseCode`, and `ProseCodeInline` components
31
31
-`ProseCodeInline` is now `ProseCode`
32
32
-`ProseCode` is now `ProsePre`
33
33
34
+
### General Changes
35
+
36
+
-`_dir.yml` files are renamed to `.navigation.yml`
37
+
- There is no source option in module options, instead you can define multiple source for your collections in `content.config.ts`.
38
+
- Document `._path` is now renamed to `.path`, likewise all internal fields with `_` prefix are removed or renamed.
39
+
-`useContentHelpers()` is removed
40
+
34
41
## Implement Document Driven mode in v3
35
42
36
43
Implementing document driven mode is Content v3 is quite easy. All you need is to create a catch-all page in Nuxt and fetch contents based on route path.
0 commit comments