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

fix remote docs example #4117

Merged
merged 2 commits into from
Jan 30, 2025
Merged

Conversation

hichemfantar
Copy link
Contributor

Why:

Closes: #4116

What's being changed (if available, include any code snippets, screenshots, or gifs):

Update page routing to accommodate an optional slug parameter, ensuring proper handling when the slug is not provided.

Check off the following:

  • I have reviewed my changes in staging, available via the View
    deployment
    link in this PR's timeline (this link will be available after
    opening the PR).

Copy link

changeset-bot bot commented Jan 30, 2025

⚠️ No Changeset found

Latest commit: 5ae7b03

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 3:24am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 3:24am

Copy link

vercel bot commented Jan 30, 2025

@hichemfantar is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@hichemfantar hichemfantar changed the title Handle optional slug parameter in page routing fix remote docs example Jan 30, 2025
@hichemfantar
Copy link
Contributor Author

hichemfantar commented Jan 30, 2025

@dimaMachina the fix works and is the same as v3 except it uses empty string instead of 'index'

letting you know so you're aware in case it's not intended

const path = params.slug?.join('/') ?? 'index'

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it, it's strange that the build command doesn't fail

@dimaMachina dimaMachina merged commit 90cd774 into shuding:main Jan 30, 2025
6 of 9 checks passed
@hichemfantar hichemfantar deleted the fix-remote-example branch January 30, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v4 remote docs example bug
2 participants