Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Example Next.js app that bundles MDX content with mdx-bundler and live reload via next-remote-watch.

Barebones example of a Next.js SPA backed by a Django REST Framework API with JWT auth.

A Next.js + Chakra UI web3 template that lets users connect MetaMask and mint customizable NFTs on the Rinkeby testnet.

Next.js clean starter template with prebuilt layout components, Sass styling, and Prettier configured.

A minimal example of using Eleventy as a static front-end for WordPress via the WP REST API.
The MDX Bundler Example is a Next.js boilerplate that demonstrates how to build a blog by bundling MDX files with the mdx-bundler library, loading them through getStaticProps or getServerSideProps.
This is a minimal example app, not a full production template, that shows how to integrate mdx-bundler, a library by Kent C. Dodds, into a Next.js project. It takes MDX files from a local folder, though they could come from a database or anywhere else, bundles them at build time or request time, and renders them as React components in a blog-like page. The example also integrates next-remote-watch, a tool from HashiCorp that lets Next.js watch files outside the pages folder, so changes to MDX files trigger live reload without restarting the dev server.
The example stores MDX files in a local directory. During data fetching, it reads the source, optionally scans for special component names with a regex, and calls bundleMDX to produce JavaScript code. That code is passed to the page component, which uses getMDXComponent to render it. When running with npm run dev:watch, next-remote-watch monitors the external content folder and triggers a reload on change.
No, it is a minimal example intended to demonstrate the mdx-bundler workflow, not a full-featured blog theme.
Use npm run dev:watch or yarn dev:watch to enable live reload of MDX files outside the pages folder. The regular dev script does not watch external content.
Yes, the example notes that content could be loaded from a database instead of a local folder; only the data fetching step changes.
The next-remote-watch library relies on undocumented Next.js APIs, so it is not a drop-in replacement for the default dev script; the example keeps both scripts available.
