mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
docs: fix bracket escape on definePageMeta
page (#26139)
This commit is contained in:
parent
a9af9e0288
commit
cd3cf0b41a
@ -200,7 +200,7 @@ The two routes "/test-category" and "/1234-post" match both `[postId]-[postSlug]
|
||||
|
||||
To make sure that we are only matching digits (`\d+`) for `postId` in the `[postId]-[postSlug]` route, we can add the following to the `[postId]-[postSlug].vue` page template:
|
||||
|
||||
```vue [pages/[postId]-[postSlug].vue]
|
||||
```vue [pages/[postId\\]-[postSlug\\].vue]
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
path: '/:postId(\\d+)-:postSlug'
|
||||
|
Loading…
Reference in New Issue
Block a user