Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jan 23, 2023
1 parent ab6e92f commit 691e541
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/en/guides/content-collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,7 @@ const { Content } = await entry.render();

The `slug()` function in `defineCollection()` lets you customize how a content entry `slug` value is created. However, this function does not have access to any frontmatter.

You can still create custom URLs from your content frontmatter inside the `getStaticPaths()` function, when building for static output.

For example, to create a custom URL for each blog post based on its `permalink` frontmatter property, you could do the following:
You can still create custom URLs from your content frontmatter inside the `getStaticPaths()` function, when building for static output. For example, to create a custom URL for each blog post based on its `permalink` frontmatter property, you could do the following:

```astro "entry.data.permalink"
---
Expand Down

0 comments on commit 691e541

Please sign in to comment.