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

Using CompileMdx to rerender site pages #3122

Open
ardenc opened this issue Aug 16, 2024 · 1 comment
Open

Using CompileMdx to rerender site pages #3122

ardenc opened this issue Aug 16, 2024 · 1 comment

Comments

@ardenc
Copy link

ardenc commented Aug 16, 2024

Hi, question on this package I am trying to make every single page on my Nextra site completely dynamic.

It for internal documentation any every user can live edit a doc on the page and have it replace the version currently there.

I have all this working fine.

When in production mode obviously changes to the file wont re-render the newest versions of the mdx file.

So I have semi implemented a way to always dynamically pull mdx for the page using an api route and compileMdx and I have this almost all working. Only real issue I have is that Compile Mdx does not appear to add the styles as normal to the mdx components.

Is there a way to get these to apply so it looks like a normal page on the docs theme with all the normal applied styles?
Or a different way to dynamically rerender my mdx content and apply all the styles?

Basically what I am looking for is how it works in next dev mode but with a working search.
^ Note I am fine with the searches only being updated once a day. I will have a script that just rebuilds the site every day in the evening.

@CryptoTyson
Copy link

Can you share a code sandbox of your implementation, please?

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

No branches or pull requests

2 participants