Back to projects

NextJs MDX Portfolio.
Kavindu Rashmika / May 12, 2025
This is a portfolio website built with NextJs and MDX. It uses the @next/mdx
package to render MDX content in NextJs pages.
โจ Features
- MDX Support ๐: Write content in MDX format.
- Syntax Highlighting ๐๏ธ : Code blocks are syntax highlighted.
- Custom Components ๐๏ธ: Use custom components in your MDX files.
- Responsive Design ๐ฒ: The website is responsive and works on all devices.
- Light & Dark Mode ๐: The website supports dark mode.
- SEO Optimized ๐: The website is optimized for search engines.
- Contact + Newsletter ๐ง: A contact form to get in touch and a newsletter form to subscribe.
- Image Optimization ๐ผ๏ธ: Images are optimized for faster loading.
๐งฐ Tech Stack
- Next.js โ๏ธ: A React framework for building static and dynamic websites.
- MDX โ๏ธ: A file format that allows you to write JSX in your Markdown files.
- TailwindCSS ๐จ: A utility-first CSS framework for building custom designs.
- Vercelโ : A cloud platform for static sites and serverless functions.
- Resend ๐ง: A service for sending emails and SMS.
- Shadcn/ui ๐งฉ: Customizable and accessible React UI components built on Radix UI and TailwindCSS.
๐ง Challenges & Solutions
- MDX + React: Embedding React components caused hydration mismatches initially. Using dynamic imports and isolating interactive parts fixed this.
- Theme Toggle: Ensuring smooth, flicker-free theme switching was tricky, but Tailwindโs utilities and state persistence made it manageable.
- Image Optimization: Managing images for different screen sizes was challenging. Using Next.js's built-in image component solved this, ensuring responsive images without manual adjustments.
- SEO: Ensuring SEO best practices with MDX was tricky. Using Next.js's Head component and structured data helped improve SEO.
๐ฎ Whatโs Next?
- ๐ Integrate advanced analytics to track engagement
- ๐ง Add more custom MDX components and shortcodes
- ๐ป Include interactive portfolio demos and live code examples
- ๐ง Enhance the newsletter feature with segmentation and analytics
๐ Deployment and platforms
- Vercel โฒ
- Cloudflare โ๏ธ
- Namecheap ๐
- Resend โ๏ธ
- ImprovMX ๐ฌ
โ Final Thoughts
-
This portfolio is a reflection of my growth and creativity as a developer. Using Next.js, MDX, TailwindCSS, and Resend, Iโve built a site thatโs scalable, maintainable, and a joy to work on.
-
I hope you found this project interesting and informative. If you have any questions or feedback, feel free to reach out to me.Thanks for reading!