From d00d3682b159fd5af7db2ebede65d69731504064 Mon Sep 17 00:00:00 2001 From: Bobbie Goede Date: Thu, 30 May 2024 05:29:16 +0200 Subject: [PATCH] docs: add custom paths notice (#2963) --- docs/content/docs/2.guide/3.custom-paths.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/2.guide/3.custom-paths.md b/docs/content/docs/2.guide/3.custom-paths.md index 67ed05270..2016d5210 100644 --- a/docs/content/docs/2.guide/3.custom-paths.md +++ b/docs/content/docs/2.guide/3.custom-paths.md @@ -103,8 +103,8 @@ export default defineNuxtConfig({ If you want customize the URL of a static vue file, you should use the file's name. If the view is in a sub-directory you should use folder name and vue files name with trailing slash. -::callout{type="warning"} -All the URL should start with `/` +::callout{icon="i-heroicons-exclamation-triangle" color="amber"} +All URLs must start with `/` :: #### Example 2: Localize the part of URL @@ -186,6 +186,12 @@ export default defineNuxtConfig({ ### Page component +::callout{icon="i-heroicons-exclamation-triangle" color="amber" title="notice"} +Note for those updating to `v8.0.1` or higher +:br :br +Path parameters parsing has been changed to match that of [Nuxt 3](https://nuxt.com/docs/guide/directory-structure/pages#dynamic-routes), you will have to update your custom paths (e.g. `/example/:param` should now be `/example/[param]`) +:: + You can use the `defineI18nRoute` compiler macro to set some custom paths for each page component. ```html {}[pages/about.vue]