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

pageMap empty in dynamic route #3759

Open
jorins opened this issue Dec 2, 2024 · 0 comments
Open

pageMap empty in dynamic route #3759

jorins opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jorins
Copy link

jorins commented Dec 2, 2024

From what I can tell, Nextra 3 fails to populate the pageMap in dynamic routes. This appears to be a regression from Nextra 2, where the page map was populated in dynamic routes.

Nextra version:
3.2.4

To Reproduce:

  1. In the default export of your theme, print the NextraThemeLayoutProps object passed to the entrypoint.
  2. Access a static route to see that pageOpts.pageMap is not empty.
  3. Access a dynamic route and you should see that pageOpts.pageMap is an empty array.

Desktop:

  • OS: Manjaro Linux
  • Browser: Firefox
  • Version: 133.0

Expected behavior:
pageMap is populated the same for dynamic routes as it is for static routes.

Additional context:
I've been working on upgrading my personal site from Nextra 2 to 3 where I encountered this issue. It's a blog-wiki-project log hybrid kind of site. I use tags to organise content. At the route /[collection]/tag/[tag], all pages in collection with the the tag tag were listed. To achieve this I made use of the pageOpts.pageMap. This worked in Nextra 2 which I used up to v2.13.2 in this commit.
I wasn't able to find any notes about this in the migration instructions, so I assume it is a bug.

@jorins jorins added the bug Something isn't working label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant