Next.js Discord

Discord Forum

Refresh Markdown documentation on CTRL+S

Unanswered
Gulf menhaden posted this in #help-forum
Open in Discord
Gulf menhadenOP
Hi there!
This is one of my first websites built with Next.js. I'm currently working on a documentation system and would like to have a faster way to edit Markdown files, ideally with live updates after saving the file (e.g., when pressing CTRL+S).

I'm using MDX to render the documentation directly on the page.

I want .mdx (or .md) files to hot-reload automatically during development. I'm also using Turbopack as my bundler.

📁 Branch with the documentation content:
https://github.com/EternalCodeTeam/website/tree/add-documentation/content/docs

⚙️ My rehype configuration:
https://github.com/EternalCodeTeam/website/blob/add-documentation/lib/mdx.tsx

Question:
How can I achieve live reloading of Markdown files in development mode?

Thanks in advance for any suggestions!

11 Replies

@Anay-208 | Ping in replies Are you using next/mdx?
Gulf menhadenOP
Yea, im using next/mdx, but still is not work
are you using docker for de server or something
@Anay-208 | Ping in replies are you using docker for de server or something
Gulf menhadenOP
nope, just bun dev command
hot-reload is working well, but not for md/mdx files
I also tired without turbopack, but still not working
I'll checkout the repo tmr
@Anay-208 | Ping in replies I'll checkout the repo tmr
Gulf menhadenOP
Did you checked? I would be very grateful