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

Nextra 4 #2600

Open
48 of 52 tasks
dimaMachina opened this issue Dec 26, 2023 · 21 comments
Open
48 of 52 tasks

Nextra 4 #2600

dimaMachina opened this issue Dec 26, 2023 · 21 comments

Comments

@dimaMachina
Copy link
Collaborator

dimaMachina commented Dec 26, 2023

@jellli

This comment was marked as resolved.

@dimaMachina

This comment was marked as resolved.

@TheMikeyRoss
Copy link

why drop support for pages? why not support both?

@dimaMachina
Copy link
Collaborator Author

why drop support for pages? why not support both?

because it requires a lot of engineering time, I already maintain this repo alone

@andriilive
Copy link

Thanks for an awesome job you're doing.

I'd really really like to see some kind of primitive static data collections API in v14, like Astro's collections or json-server.
https://docs.astro.build/en/tutorials/add-content-collections/
https://github.com/typicode/json-server

@Waylon-Firework
Copy link

when will the v4 be release

@dimaMachina
Copy link
Collaborator Author

dimaMachina commented Oct 1, 2024

Nextra v3 was finally released. And Nextra v4 prerelease just out! Currently without docs changes update or migration guide.

Nextra v4 will support a file-based router for your mdx files,
for anyone who wants to give it a try, feel free to take a look at nextra.site migration https://github.com/shuding/nextra/tree/v4-v2/docs or blog https://github.com/shuding/nextra/tree/v4-v2/examples/blog

Nextra v4 will also support rendering your docs from a single catch-all route app/[[...slug]].jsx. Currently, as unstable and without hot reloading working, but I will fix it before stable releasing Fixed.

Feel free to take a look at docs and i18n docs examples that were migrated to it! https://github.com/shuding/nextra/tree/v4-v2/examples

Prerelease v4 last versions:
https://github.com/shuding/nextra/releases/tag/nextra%404.0.0-app-router.6
https://github.com/shuding/nextra/releases/tag/nextra-theme-docs%404.0.0-app-router.6
https://github.com/shuding/nextra/releases/tag/nextra-theme-blog%404.0.0-app-router.6

Feel free to share your feedback and create separated issues for problems you encountered

Have fun!

@dimaMachina
Copy link
Collaborator Author

Yes, the search needs to index built .html files, you must to add postbuild script as follows

"postbuild": "pagefind --site .next/server/app --output-path .next/static/chunks/pagefind",

Also, nextra-theme-blog in v4 has search as well

Check out the last preview https://nextra-v2-6bnfo6seg-shud.vercel.app/ where you can see working search

@dimaMachina
Copy link
Collaborator Author

https://github.com/shuding/nextra/releases/tag/nextra%404.0.0-app-router.13 is just out with Turbopack support

@lacymorrow
Copy link

Fak yeah dude

@dimaMachina
Copy link
Collaborator Author

For everybody waiting for Nextra v4, I am finishing the Blogpost announcement for Nextra v4 RC.0 with all features and migration guide, so stay tuned 😁

@codewreaker
Copy link

For everybody waiting for Nextra v4, I am finishing the Blogpost announcement for Nextra v4 RC.0 with all features and migration guide, so stay tuned 😁

Looking forward to it. I am currently using next 15 and searching the whole v4-v2 branch for any information. I will wait for you then

@olegchursin
Copy link

Nextra v4 is looking 🔥 ! Can't wait for RC.0 and a blogpost @dimaMachina . Thanks for all the work!

@officialrajdeepsingh
Copy link

For everybody waiting for Nextra v4, I am finishing the Blogpost announcement for Nextra v4 RC.0 with all features and migration guide, so stay tuned 😁

Waiting

@Thijmen
Copy link

Thijmen commented Nov 6, 2024

If one would like to start with Nextra v4, which branch should be used in that case? I don't care if it may break or not - just looking for next opportunities to create a docs site :)

@dimaMachina
Copy link
Collaborator Author

https://github.com/shuding/nextra/tree/v4-v2

@CorruptionTiger
Copy link

If God asked me who the best person in the world is, I would say B2o5T.

@tomsvetna
Copy link

First of all thanks for all the hard work you're putting into this project :) I would like to run new v4 version with app router support however it's failing for me with this error:

Import trace for requested module:
./node_modules/nextra/dist/server/page-map/placeholder.js?lang=
./node_modules/nextra/dist/server/page-map/get.js
./node_modules/nextra/dist/server/page-map/index.js
./app/docs/layout.jsx
 ⨯ ./node_modules/nextra/dist/server/page-map/placeholder.js?lang=
Attempted import error: 'metadata' is not exported from 'private-next-root-dir/app/auth/action/page.tsx' (imported as 'app_auth_action_page').

I have only /docs path specified for Nextra so I think /auth/action shouldn't be checked for anything? :) I also can't simply add metada into this page since it's a client component.

@Firgrep
Copy link

Firgrep commented Dec 5, 2024

@tomsvetna Put the client component in a separate file and import it, keeping the page a server component. Then add the metadata requirement.

@SrBrahma
Copy link

SrBrahma commented Dec 9, 2024

@dimaMachina are the v4 docs being hosted anywhere public already?

@nikischin
Copy link

@dimaMachina are the v4 docs being hosted anywhere public already?

You should be able to use the latest preview links in #2653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests