Skip to content

Commit

Permalink
docs: add custom paths notice (#2963)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede committed May 30, 2024
1 parent fe30029 commit d00d368
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/content/docs/2.guide/3.custom-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit d00d368

Please sign in to comment.