Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference dynamic route variables in Legacy Collection examples in v5.mdx #9555

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/content/docs/en/guides/upgrade-to/v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ See the instructions below for updating an existing content collection with Mark
---
```

** Be sure to also do the same for files as well.

```astro ins={4} del={3}
// src/pages/blog
---
[...slug].astro
[...id].astro
```

4. **Switch to the new `render()` function**. Entries no longer have a `render()` method, as they are now serializable plain objects. Instead, import the `render()` function from `astro:content`.

```astro title="src/pages/index.astro" ins=", render" del={6} ins={7}
Expand Down
Loading