Skip to content

Commit

Permalink
Add missing code fence to routing-reference.mdx (#10352)
Browse files Browse the repository at this point in the history
Fix code fence missing which breaks highlighting on a code block
  • Loading branch information
louisescher authored Dec 12, 2024
1 parent c95fcbc commit e5ea9a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/docs/en/reference/routing-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ A function that can be returned from [`getStaticPaths()`](#getstaticpaths) to di
The following example fetches and passes 150 items to the `paginate` function, and creates static, prerendered pages at build time that will display 10 items per page:

```astro title="src/pages/pokemon/[page].astro"
---
export async function getStaticPaths({ paginate }) {
// Load your data with fetch(), getCollection(), etc.
const response = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`);
Expand All @@ -194,6 +195,7 @@ export async function getStaticPaths({ paginate }) {
}
const { page } = Astro.props;
---
```

`paginate()` has the following arguments:
Expand Down

0 comments on commit e5ea9a3

Please sign in to comment.