Skip to content

Commit 2caa486

Browse files
committed
docs: update migration
1 parent 8ea4de1 commit 2caa486

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

docs/content/docs/1.getting-started/4.migration.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Don't worry, you don't need to modify your content files, We made sure that Cont
99

1010
## Changes
1111

12-
Here is the list of breaking changes in Content v3:
12+
### Query/Find Contents
1313

1414
- `queryContent()` API is replaced with new `queryCollection()`
1515
- New API is backed by SQL
@@ -19,18 +19,25 @@ Here is the list of breaking changes in Content v3:
1919
- Document driven mode is fully dropped, meaning:
2020
- Markdown files will not convert to Nuxt pages automatically, you need to create pages, see [how](/docs/components/content-renderer#example)
2121
- `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`
2722
- `searchContent()` is dropped in favor of new api `queryCollectionSearchSections`
2823
- 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" />`
3030
- We consolidated the `ProsePre`, `ProseCode`, and `ProseCodeInline` components
3131
- `ProseCodeInline` is now `ProseCode`
3232
- `ProseCode` is now `ProsePre`
3333

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+
3441
## Implement Document Driven mode in v3
3542

3643
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

Comments
 (0)