Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add information on using a custom regexp in definePageMeta #25073

Merged
merged 4 commits into from Jan 16, 2024

Conversation

L422Y
Copy link
Contributor

@L422Y L422Y commented Jan 5, 2024

Adds an example of using a path matcher and links to more information on the matching syntax

โ“ Type of change

  • ๐Ÿ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • โœจ New feature (a non-breaking change that adds functionality)
  • ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Adds extended information for using a path matcher and links to more information on the matching syntax, links to the example from the path configuration option definition. Allows devs without previous knowledge of advanced path matching syntax to preview what is possible with the path option in definePageMeta

๐Ÿ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

โ€ฆeMeta

Adds an example of using a path matcher and links to more information on the matching syntax
Copy link

stackblitz bot commented Jan 5, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

nuxt-studio bot commented Jan 5, 2024

โœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio โ†—๏ธŽ View Live Preview d43c5d6

@github-actions github-actions bot added the 3.x label Jan 5, 2024
@L422Y L422Y changed the title docs: add information on/example of using a path matcher in definePagโ€ฆ docs: add information on/example of using a path matcher in definePageMeta Jan 6, 2024
@DamianGlowala DamianGlowala self-requested a review January 12, 2024 15:46
@danielroe danielroe changed the title docs: add information on/example of using a path matcher in definePageMeta docs: add information on using a custom regexp in definePageMeta Jan 16, 2024
@@ -60,7 +60,7 @@ interface PageMeta {

- **Type**: `string`

You may define a path matcher, if you have a more complex pattern than can be expressed with the file name.
You may define a [custom regular expression](#using-a-custom-regular-expression), if you have a more complex pattern than can be expressed with the file name.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed 'path matcher' here to match Vue Router docs which talk about 'custom regex': https://router.vuejs.org/guide/essentials/route-matching-syntax.html#Custom-regex-in-params.

docs/3.api/3.utils/define-page-meta.md Outdated Show resolved Hide resolved
docs/3.api/3.utils/define-page-meta.md Outdated Show resolved Hide resolved
Co-authored-by: Damian Gล‚owala <damian.glowala.rebkow@gmail.com>
@danielroe danielroe merged commit b3fb75c into nuxt:main Jan 16, 2024
4 checks passed
This was referenced Jan 16, 2024
@L422Y L422Y deleted the patch-1 branch January 17, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants