Skip to content

Commit ff457ab

Browse files
fix(recipes/i18n): update code snippet to use collection id (withastro#11549)
Co-authored-by: Yan <[email protected]>
1 parent b84971f commit ff457ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/en/recipes/i18n.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ If you prefer the default language to not be visible in the URL unlike other lan
120120
const pages = await getCollection('blog');
121121
122122
const paths = pages.map(page => {
123-
const [lang, ...slug] = page.slug.split('/');
123+
const [lang, ...slug] = page.id.split('/');
124124
return { params: { lang, slug: slug.join('/') || undefined }, props: page };
125125
});
126126

0 commit comments

Comments
 (0)