From 4bec200a1671e5d02e2cd550e8fa135f1011ac90 Mon Sep 17 00:00:00 2001 From: Louis Escher <66965600+louisescher@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:05:58 +0100 Subject: [PATCH] Update routing-reference.mdx Fix code fence missing which breaks highlighting on a code block --- src/content/docs/en/reference/routing-reference.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/docs/en/reference/routing-reference.mdx b/src/content/docs/en/reference/routing-reference.mdx index 77355087d7764..13c27f4ffff46 100644 --- a/src/content/docs/en/reference/routing-reference.mdx +++ b/src/content/docs/en/reference/routing-reference.mdx @@ -183,6 +183,7 @@ A function that can be returned from [`getStaticPaths()`](#getstaticpaths) to di The following example fetches and passes 150 items to the `paginate` function, and creates static, prerendered pages at build time that will display 10 items per page: ```astro title="src/pages/pokemon/[page].astro" +--- export async function getStaticPaths({ paginate }) { // Load your data with fetch(), getCollection(), etc. const response = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`); @@ -194,6 +195,7 @@ export async function getStaticPaths({ paginate }) { } const { page } = Astro.props; +--- ``` `paginate()` has the following arguments: