Iderbrandt
HemBloggÄmnenLänkarOm

Iderbrandt.com

Personlig blogg om utveckling, teknik och det som fångar intresset — skrivet av Tobias Iderbrandt.

Utforska

BloggÄmnenLänkarOmIntegritetRSS

Konto

Logga inSupport me on Ko-fi
© iderbrandt.com
Support me on Ko-fi
Project·Tobias Iderbrandt·3 min läsning·16 visningar

Building a Custom Notion CMS with Next.js 14

I built a custom CMS using Next.js 14 and Notion to streamline my blogging workflow. Features include a split -view Markdown editor, drag-and-drop image uploads to Cloudinary, and slash commands—all integrated directly into my website.

25 december 2025
nextjsnotionreacttailwind
Building a Custom Notion CMS with Next.js 14

Building a Custom Notion CMS with Next.js 14

I've always loved Notion for its writing experience, but I wanted full control over my blog's frontend. Today, I'm excited to share (and test!) the new custom Content Management System (CMS) I've built for iderbrandt.com.

In fact, I am writing this very post inside the new Admin Dashboard we just built!

Why Build a Custom CMS?

While there are plenty of headless CMS options out there, I wanted something that felt personal and integrated perfectly with my workflow. My requirements were simple but specific:

Notion as the Database: I want to keep my data in Notion because it's portable and easy to manage.

Frictionless Writing: I need a distraction-free editor that supports Markdown.

Image Power: Handling images should be as easy as dragging and dropping.

The Tech Stack

  • Framework: Next.js 14 (App Router)

  • Database: Notion API

  • Styling: Tailwind CSS

  • Auth: NextAuth.js (Secure Admin Access)

  • Storage: Cloudinary (for high-performance images)

Key Features

  1. The Admin Dashboard

I built a secured /admin route that allows me to manage all my posts. It connects directly to the Notion API to fetch, create, update, and delete pages. No more jumping between Vercel logs and Notion tables.

  1. The "Split View" Editor

Writing Markdown is great, but seeing how it renders is better. I implemented a Split View mode that shows the raw Markdown on the left and a live preview on the right.

  1. Drag & Drop Image Uploads

This is my favorite feature. I can simply drag an image from my desktop directly into the editor. The system automatically:

Uploads it to Cloudinary.

Optimizes it.

Inserts the correct Markdown ![image](url) tag right where my cursor is.

  1. Slash Commands

Inspired by Notion itself, I added "Slash Commands". Typing / opens a menu to quickly insert headings, code blocks, quotes, and lists without taking my hands off the keyboard.

How It Works Under the Hood

When I hit Publish, the application sends the Markdown content to a server-side API route. This route parses the Markdown into Notion "Blocks" (paragraphs, headings, images) and pushes them to the database via the Notion SDK.

Finally, it triggers revalidatePath, so this post appears on the live site instantly—no rebuilds required.

Conclusion

Building your own tools is one of the most satisfying parts of being a developer. This new workflow removes all the friction from writing, allowing me to focus on what matters: sharing ideas.

Hello world, from my new CMS! 🚀

Gillade du inlägget?

Dela det med någon som också kan tycka det är intressant.

Share this post
X (Twitter)FacebookLinkedInEmailWhatsApp

Gillade du inlägget?

Om du vill stötta arbetet med bloggen får du gärna bjuda på en kaffe.

Support me on Ko-fi

Populärt

Getting Wi-Fi to work on an old Macbook Pro (Ubuntu)

46 visningar

Hur jag kör node.js/next.js hos Oderland

35 visningar

Why I Migrated my Next.js Blog from Vercel to Cloudflare Workers

33 visningar

Relaterade inlägg

Albins Brick City del 2: gå runt i stan, åk tåg och hälsa på hos kompisar
30 oktober 2026·Project

Albins Brick City del 2: gå runt i stan, åk tåg och hälsa på hos kompisar

Legostaden har vuxit ordentligt. Nu går du runt i den som en legogubbe, går in i husen, åker buss, tåg och färja, och kan dela din stad så att kompisar kan hälsa på.

Läs inlägg
Albins Brick City: bygg en hel legostad runt huset du byggt
29 oktober 2026·Project

Albins Brick City: bygg en hel legostad runt huset du byggt

Huset du bygger i Brick Builder får grannar. Tryck på Build a town! och ditt legohus flyttar in på en stor basplatta, där du bygger vägar, affärer, parker och skolor och ser staden växa.

Läs inlägg
Hot Rod Summer '63: en modern hyllning till Street Rod
28 oktober 2026·Project

Hot Rod Summer '63: en modern hyllning till Street Rod

När jag var liten spelade jag Street Rod på en 286:a. Nu har jag byggt en modern version i webbläsaren: köp en bil ur radannonserna, bygg upp den i garaget och kör kvartsmil om pengar eller pink slips. Slå The King före Labor Day.

Läs inlägg