<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Bakar's Blog</title>
        <link>https://www.bakar.info/blog</link>
        <description>Latest blog posts from Muhammad Abu Bakar</description>
        <lastBuildDate>Sat, 14 Jun 2025 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Bakar's Blog</title>
            <url>https://www.bakar.info/pic.jpg</url>
            <link>https://www.bakar.info/blog</link>
        </image>
        <copyright>All rights reserved 2026, Muhammad Abu Bakar</copyright>
        <atom:link href="https://www.bakar.info/rss.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[How to transfer your domain to Vercel]]></title>
            <link>https://www.bakar.info/blog/post/how-to-transfer-your-domain-to-vercel</link>
            <guid>https://www.bakar.info/blog/post/how-to-transfer-your-domain-to-vercel</guid>
            <pubDate>Sat, 14 Jun 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Why transfer your domain to Vercel? Because it's easier to manage everything in one place.]]></description>
            <content:encoded><![CDATA[<article>
        <img src="https://www.bakar.info/images/posts/how-to-transfer-your-domain-to-vercel/cover.jpg" alt="How to transfer your domain to Vercel" />
        <h2>Step 1: Check Transfer Eligibility</h2>
<p>Before transferring your domain to Vercel, make sure it is at least 60 days old.</p>
<p>I have the following domains registered with Namecheap, and all of them are at least 60 days old as of June 14, 2025.</p>
<h2>Prerequisites</h2>
<p>Before getting started, ensure you have:</p>
<p>- A domain registered with a domain registrar (e.g. Namecheap, GoDaddy, etc.)<br/>- Basic knowledge of DNS records and how to manage them</p>
<h2>Step 1: Install Dependencies</h2>
<p>Run the following command to install the required dependencies:</p>
<pre><code>npm install next-mdx-remote next-mdx-remote/serialize remark-gfm remark-math rehype-slug
</code></pre>
<h2>Step 2: Create an MDX Rendering Component</h2>
<p>Create a new component `MDXRenderer.tsx` inside the `components` folder:</p>
<pre><code>"use client";</code></pre>
<p>import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";<br/>import React from "react";</p>
<p>interface MDXRendererProps {<br/>  source: MDXRemoteSerializeResult;<br/>}</p>
<p>const MDXRenderer: React.FC&lt;MDXRendererProps&gt; = ({ source }) =&gt; {<br/>  return &lt;MDXRemote {...source} /&gt;;<br/>};</p>
<p>export default MDXRenderer;<br/>```</p>
<h2>Step 3: Create an MDX Fetching Function</h2>
<p>Next, create a helper function to serialize and fetch the MDX content in `lib/mdx.ts`:</p>
<pre><code>import { serialize } from "next-mdx-remote/serialize";
import rehypeSlug from "rehype-slug";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";</code></pre>
<p>export async function getMdxContent(content: string) {<br/>  return await serialize(content, {<br/>    mdxOptions: {<br/>      remarkPlugins: [remarkGfm, remarkMath],<br/>      rehypePlugins: [rehypeSlug],<br/>    },<br/>  });<br/>}<br/>```</p>
<h2>Step 4: Implement Dynamic MDX Rendering in a Page</h2>
<p>Now, create a dynamic page to display the MDX content. Inside `app/mdx/page.tsx`, add the following code:</p>
<pre><code>import MDXRenderer from "@/components/MDXRenderer";
import { getMdxContent } from "@/lib/mdx";</code></pre>
<p>const mdxContent = `<br/># Hello MDX</p>
<p>This is a sample MDX content with **bold text** and a [link](https://nextjs.org/).</p>
<p>&gt; Blockquotes work too!</p>
<p>\`\`\`tsx<br/>console.log("Hello, Next.js 15!");<br/>\`\`\`<br/>`;</p>
<p>export default async function MdxPage() {<br/>  const mdxSource = await getMdxContent(mdxContent);<br/>  return (<br/>    &lt;div className="prose mx-auto p-5"&gt;<br/>      &lt;MDXRenderer source={mdxSource} /&gt;<br/>    &lt;/div&gt;<br/>  );<br/>}<br/>```</p>
<h2>Step 5: Test the MDX Integration</h2>
<p>Start the development server:</p>
<pre><code>npm run dev
</code></pre>
<p>Navigate to `http://localhost:3000/mdx`, and you should see the rendered MDX content!</p>
<h2>Conclusion</h2>
<p>Using `next-mdx-remote`, you can load and render raw MDX dynamically in Next.js 15 with the App Router. This approach enables fetching MDX from various sources, making it ideal for blog engines, CMS integrations, and dynamic documentation sites.</p>
      </article>]]></content:encoded>
            <author>ironsamurai786@gmail.com (Muhammad Abu Bakar)</author>
            <category>Vercel</category>
            <category>Vercel</category>
            <category>DNS</category>
            <category>Domain Transfer</category>
            <enclosure url="https://www.bakar.info/images/posts/how-to-transfer-your-domain-to-vercel/cover.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Implementing next-mdx-remote in Next.js]]></title>
            <link>https://www.bakar.info/blog/post/how-to-implement-next-mdx-remote-with-nextjs</link>
            <guid>https://www.bakar.info/blog/post/how-to-implement-next-mdx-remote-with-nextjs</guid>
            <pubDate>Sat, 08 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Learn how to implement next-mdx-remote in Next.js 15 using the App Router to dynamically render raw MDX content. This guide covers setup, serialization, and rendering for a seamless MDX integration.]]></description>
            <content:encoded><![CDATA[<article>
        <img src="https://www.bakar.info/images/posts/how-to-implement-next-mdx-remote-with-nextjs/cover.jpg" alt="Implementing next-mdx-remote in Next.js" />
        <h2>Introduction</h2>
<p>Markdown with JSX (MDX) is a powerful way to write content-rich applications in Next.js. The `next-mdx-remote` library allows us to load MDX from various sources, such as CMSs or APIs, and render it dynamically. In this tutorial, we will explore how to integrate `next-mdx-remote` in a Next.js 15 application using the App Router and load raw MDX content.</p>
<h2>Prerequisites</h2>
<p>Before getting started, ensure you have:</p>
<p>- **Node.js 18+** installed<br/>- A Next.js 15 project set up (`npx create-next-app@latest`)<br/>- Basic knowledge of Next.js and MDX</p>
<h2>Step 1: Install Dependencies</h2>
<p>Run the following command to install the required dependencies:</p>
<pre><code>npm install next-mdx-remote next-mdx-remote/serialize remark-gfm remark-math rehype-slug
</code></pre>
<h2>Step 2: Create an MDX Rendering Component</h2>
<p>Create a new component `MDXRenderer.tsx` inside the `components` folder:</p>
<pre><code>"use client";</code></pre>
<p>import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";<br/>import React from "react";</p>
<p>interface MDXRendererProps {<br/>  source: MDXRemoteSerializeResult;<br/>}</p>
<p>const MDXRenderer: React.FC&lt;MDXRendererProps&gt; = ({ source }) =&gt; {<br/>  return &lt;MDXRemote {...source} /&gt;;<br/>};</p>
<p>export default MDXRenderer;<br/>```</p>
<h2>Step 3: Create an MDX Fetching Function</h2>
<p>Next, create a helper function to serialize and fetch the MDX content in `lib/mdx.ts`:</p>
<pre><code>import { serialize } from "next-mdx-remote/serialize";
import rehypeSlug from "rehype-slug";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";</code></pre>
<p>export async function getMdxContent(content: string) {<br/>  return await serialize(content, {<br/>    mdxOptions: {<br/>      remarkPlugins: [remarkGfm, remarkMath],<br/>      rehypePlugins: [rehypeSlug],<br/>    },<br/>  });<br/>}<br/>```</p>
<h2>Step 4: Implement Dynamic MDX Rendering in a Page</h2>
<p>Now, create a dynamic page to display the MDX content. Inside `app/mdx/page.tsx`, add the following code:</p>
<pre><code>import MDXRenderer from "@/components/MDXRenderer";
import { getMdxContent } from "@/lib/mdx";</code></pre>
<p>const mdxContent = `<br/># Hello MDX</p>
<p>This is a sample MDX content with **bold text** and a [link](https://nextjs.org/).</p>
<p>&gt; Blockquotes work too!</p>
<p>\`\`\`tsx<br/>console.log("Hello, Next.js 15!");<br/>\`\`\`<br/>`;</p>
<p>export default async function MdxPage() {<br/>  const mdxSource = await getMdxContent(mdxContent);<br/>  return (<br/>    &lt;div className="prose mx-auto p-5"&gt;<br/>      &lt;MDXRenderer source={mdxSource} /&gt;<br/>    &lt;/div&gt;<br/>  );<br/>}<br/>```</p>
<h2>Step 5: Test the MDX Integration</h2>
<p>Start the development server:</p>
<pre><code>npm run dev
</code></pre>
<p>Navigate to `http://localhost:3000/mdx`, and you should see the rendered MDX content!</p>
<h2>Conclusion</h2>
<p>Using `next-mdx-remote`, you can load and render raw MDX dynamically in Next.js 15 with the App Router. This approach enables fetching MDX from various sources, making it ideal for blog engines, CMS integrations, and dynamic documentation sites.</p>
      </article>]]></content:encoded>
            <author>ironsamurai786@gmail.com (Muhammad Abu Bakar)</author>
            <category>Next.js</category>
            <category>Next.js</category>
            <category>next-mdx-remote</category>
            <category>App Router</category>
            <category>MDX</category>
            <category>Dynamic MDX</category>
            <enclosure url="https://www.bakar.info/images/posts/how-to-implement-next-mdx-remote-with-nextjs/cover.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[How to Update Tailwind CSS to v4 in Next.js]]></title>
            <link>https://www.bakar.info/blog/post/update-tailwindcss-v4</link>
            <guid>https://www.bakar.info/blog/post/update-tailwindcss-v4</guid>
            <pubDate>Fri, 07 Feb 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[Learn how to update Tailwind CSS to version 4 in your Next.js 15 project using the App Router. A step-by-step guide with easy-to-follow instructions.]]></description>
            <content:encoded><![CDATA[<article>
        <img src="https://www.bakar.info/images/posts/update-tailwindcss-v4/cover.jpg" alt="How to Update Tailwind CSS to v4 in Next.js" />
        <h1>How to Update Tailwind CSS to v4 in Next.js 15 App Router</h1>
<p>Tailwind CSS just dropped version 4, and if you're using Next.js 15 with the App Router, you might be wondering how to upgrade smoothly. Don't worry—I've got you covered. Let's walk through the update step by step.</p>
<h2>Why Upgrade to Tailwind CSS v4?</h2>
<p>Tailwind v4 brings performance improvements, better tree-shaking, and a few breaking changes. Updating ensures your project stays up to date and benefits from the latest features and optimizations.</p>
<h2>Step 1: Update Tailwind CSS</h2>
<p>First, open your terminal and run the following command:</p>
<pre><code>npm install tailwindcss@latest postcss@latest autoprefixer@latest
</code></pre>
<p>Or if you're using Yarn:</p>
<pre><code>yarn add tailwindcss@latest postcss@latest autoprefixer@latest
</code></pre>
<p>This will install the latest Tailwind CSS along with PostCSS and Autoprefixer.</p>
<h2>Step 2: Update Tailwind Config</h2>
<p>Tailwind v4 removes support for CommonJS config files, so you need to update your `tailwind.config.js` to `tailwind.config.ts`:</p>
<p>1. Rename `tailwind.config.js` to `tailwind.config.ts`<br/>2. Update the file like this:</p>
<pre><code>import { defineConfig } from "tailwindcss";</code></pre>
<p>export default defineConfig({<br/>  content: [<br/>    "./app/**/*.{js,ts,jsx,tsx,mdx}",<br/>    "./components/**/*.{js,ts,jsx,tsx,mdx}",<br/>  ],<br/>  theme: {<br/>    extend: {},<br/>  },<br/>  plugins: [],<br/>});<br/>```</p>
<h2>Step 3: Update `postcss.config.js`</h2>
<p>Tailwind v4 requires PostCSS 8+, so make sure your `postcss.config.js` file looks like this:</p>
<pre><code>module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
};
</code></pre>
<h2>Step 4: Check for Breaking Changes</h2>
<p>Some class names and configurations have changed. If your build breaks after updating, check the [Tailwind CSS v4 release notes](https://tailwindcss.com/docs/upgrade-guide) for any breaking changes that might affect your project.</p>
<h2>Step 5: Restart Your Dev Server</h2>
<p>After making these updates, restart your development server:</p>
<pre><code>npm run dev
</code></pre>
<p>or</p>
<pre><code>yarn dev
</code></pre>
<p>Now, your Next.js 15 project should be running with Tailwind CSS v4!</p>
<h2>Conclusion</h2>
<p>Updating Tailwind CSS to v4 in a Next.js 15 project with the App Router is pretty straightforward. Just update the dependencies, adjust your config files, and check for any breaking changes. Now you're all set to use the latest Tailwind features!</p>
<p>---</p>
      </article>]]></content:encoded>
            <author>ironsamurai786@gmail.com (Muhammad Abu Bakar)</author>
            <category>Tailwind CSS</category>
            <category>Tailwind CSS</category>
            <category>Next.js</category>
            <category>PostCSS</category>
            <category>Upgrade TailwindCSS</category>
            <enclosure url="https://www.bakar.info/images/posts/update-tailwindcss-v4/cover.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>