Skip to content

Commit

Permalink
Update API reference with new slug frontmatter property (#2471)
Browse files Browse the repository at this point in the history
* Update custom slug for content collection in api reference

Replace mention of the removed `slug()` function with the new page-specific frontmatter `slug`-property

* Update src/pages/en/reference/api-reference.mdx
  • Loading branch information
fflaten authored Jan 29, 2023
1 parent b89df0d commit 24623fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ A unique ID using the file path relative to `src/content/[collection]`. Enumerat

**Example Type:** `'entry-1' | 'entry-2' | ...`

A URL-ready slug. Defaults to the `id` without the file extension, but can be configured using [the `slug()` config property](#slug). Set to the type `string` if a `slug()` override is configured, and enumerates all possible string values otherwise.
A URL-ready slug. Defaults to the `id` without the file extension, but can be overridden by setting [the `slug` property](/en/guides/content-collections/#defining-custom-slugs) in a file's frontmatter.

#### `data`

Expand Down

0 comments on commit 24623fb

Please sign in to comment.