Skip to content

Commit

Permalink
fix(api-reference): add getStaticPaths type
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandPhilippot committed Jul 29, 2024
1 parent f863f72 commit 6c4017c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/content/docs/en/reference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,8 @@ See also: [`Astro.locals`](#astrolocals)

## `getStaticPaths()`

**Type:** `(options: GetStaticPathsOptions) => Promise<GetStaticPathsResult> | GetStaticPathsResult`

If a page uses dynamic params in the filename, that component will need to export a `getStaticPaths()` function.

This function is required because Astro is a static site builder. That means that your entire site is built ahead of time. If Astro doesn't know to generate a page at build time, your users won't see it when they visit your site.
Expand Down

0 comments on commit 6c4017c

Please sign in to comment.