Skip to content

Commit

Permalink
fix(api-reference): add missing Since and default in paginate section
Browse files Browse the repository at this point in the history
* Add default for `page.size` and `pageSize` (see withastro/astro#11561)
* Add missing Since for `page.url.first` and `page.url.last` (see withastro/astro#11176)
  • Loading branch information
ArmandPhilippot committed Jul 29, 2024
1 parent d4568c6 commit a968374
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/content/docs/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ const { page } = Astro.props;
- `/posts/[...page].astro` would generate the URLs `/posts`, `/posts/2`, `/posts/3`, etc.

`paginate()` has the following arguments:
- `pageSize` - The number of items shown per page
- `pageSize` - The number of items shown per page (`10` by default)
- `params` - Send additional parameters for creating dynamic routes
- `props` - Send additional props to be available on each page

Expand Down Expand Up @@ -960,7 +960,8 @@ Index of last item on current page.
##### `page.size`

<p>
**Type:** `number`
**Type:** `number`
**Default:** `10`
</p>

How many items per-page.
Expand Down Expand Up @@ -1015,6 +1016,8 @@ Get the URL of the next page (will be `undefined` if no more pages). If a value

##### `page.url.first`

<p><Since v="4.12.0" /></p>

<p>
**Type:** `string | undefined`
</p>
Expand All @@ -1023,6 +1026,8 @@ Get the URL of the first page (will be `undefined` if on page 1). If a value is

##### `page.url.last`

<p><Since v="4.12.0" /></p>

<p>
**Type:** `string | undefined`
</p>
Expand Down

0 comments on commit a968374

Please sign in to comment.