-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When the content/index.md
file contains a relative link (./foo/bar.md
) and basePath
is set the link targets /foo/bar
instead of /base-path/foo/bar
. When clicking on the link the user receives a 404.
To Reproduce Steps to reproduce the behavior:
Repro repo: https://github.com/pcorliss/nextra-sidebar-repro
git clone https://github.com/pcorliss/nextra-sidebar-repro.git
cd nextra-sidebar-repro
npm ci
npm run dev
- Navigate to http://localhost:3000/sidebar-repro
- Clicking
[relative link](./generated/aa/test-file-081.md)
results in a 404 - Clicking
[relative with basePath](./sidebar-repro/generated/aa/test-file-081.md)
renders - Clicking
[absolute link](/generated/aa/test-file-081.md)
renders
Expected behavior
Relative links from the content/index.md
page should not 404.
Desktop (please complete the following information):
- OS: MacOs & Windows
- Browser: Chrome & Firefox
- Version Chrome 137.0.7151.104, Firefox 139.0.4 (aarch64)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Milestone
Relationships
Development
Select code repository
Activity