ProjectsCraftsFigmaBlogsContact

Getting Started with Next.js and MDX

December 7, 2024•1 min read•Piyush Zingade
#nextjs#mdx#bun#tutorial

Welcome to My Blog

This is my first blog post using MDX with Next.js and Bun! 🚀

Why MDX?

MDX allows you to use JSX in your markdown content. This means you can:

  • Write markdown naturally
  • Import and use React components
  • Create interactive documentation
  • Build dynamic content

Code Example

Here's a simple JavaScript example:

const greeting = (name) => {
  return `Hello, ${name}!`;
};

console.log(greeting("World"));

Custom Components

You can use custom React components directly in your MDX:

This is a custom alert component rendered inside MDX!

Lists and More

  • Fast development with Bun
  • Server-side rendering with Next.js
  • Beautiful syntax highlighting
  • Type-safe content management

That's it! Happy blogging! ✨

0
likes