diff options
Diffstat (limited to 'docs/src/pages/es/reference/api-reference.md')
-rw-r--r-- | docs/src/pages/es/reference/api-reference.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/src/pages/es/reference/api-reference.md b/docs/src/pages/es/reference/api-reference.md index 4b2308d11..b1155ac8b 100644 --- a/docs/src/pages/es/reference/api-reference.md +++ b/docs/src/pages/es/reference/api-reference.md @@ -104,7 +104,7 @@ If a page uses dynamic params in the filename, that component will need to expor 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. -```jsx +```astro --- export async function getStaticPaths() { return [ @@ -130,7 +130,7 @@ The `params` key of every returned object tells Astro what routes to build. The For example, suppose that you have a page at `src/pages/posts/[id].astro`. If you export `getStaticPaths` from this page and return the following for paths: -```js +```astro --- export async function getStaticPaths() { return [ @@ -151,7 +151,7 @@ To pass additional data to each generated page, you can also set a `props` value For example, suppose that you generate pages based off of data fetched from a remote API. You can pass the full data object to the page component inside of `getStaticPaths`: -```js +```astro --- export async function getStaticPaths() { const data = await fetch('...').then(response => response.json()); |