Development··3 min read

Building My Own Blog with Next.js

Why I left Velog, how I built my own blog, and what I learned along the way.

My Writing, but I Can't Touch a Single Line of CSS

I wrote on Velog for 2 years. Great platform. But at some point, a restlessness set in. I wanted to change the design but couldn't. The series feature felt lacking. It was my writing, but not my domain.

The tipping point was this: as a developer, shouldn't I build my own blog at least once?

(Okay, honestly, I just thought it'd look cool.)

The Tech Stack Was a No-Brainer

Framework: Next.js. Ideal for static sites with SSG, and the one I know best. Content: MDX. Write in Markdown, but with the option to embed React components when needed. Styling: Tailwind CSS.

File-system based, no database. I considered adding a CMS, but managing posts through Git felt more natural for a developer.

Started Friday Evening, Deployed Sunday Night

Post list, post detail, category filter. With just those three, you have the minimum viable blog.

Parsing MDX files was trickier than expected. Building utility functions to extract frontmatter, sort by date, and group by category took half a day.

For code highlighting, I went with rehype-pretty-code + Shiki. Setup was a bit involved, but once configured, you never touch it again -- worth the investment.

No Design Sense, So I Copied Notion

Honestly, I don't have much of a design eye. So I leaned on the Notion aesthetic. Clean, readable layout, generous whitespace, colors that don't scream. The post list was inspired by Notion's database views -- card-based.

Dark mode too. Follows system settings by default, with a manual toggle. With prefers-color-scheme media queries and CSS variables, it comes together cleaner than you'd expect.

Vercel Deployment Takes 5 Minutes

Push to GitHub and it auto-builds and deploys. The preview deployment feature is useful too -- submit a post as a PR and preview it before merging. Custom domain setup? Also 5 minutes.

My own blog, on a domain with my name. The satisfaction from this small thing is bigger than you'd think.

Features Added Over Time

Search, TOC, series navigation, related posts, RSS feed, sitemap. I didn't build these all at once -- each was added when the need arose. Search was implemented client-side, no search engine needed. For a few hundred posts, it's plenty.

I built a Cmd+K modal for search, and every time I use it, it feels great. A kind of satisfaction you don't get from someone else's blog.

I'd Recommend It, but There's a Trap

Absolutely recommend it. But if writing is the goal, start on a platform first and migrate later.

Don't fall into the trap of spending all your time building the blog and never actually writing. I fell into it myself -- the first month, I was so busy adding features that I didn't write a single post.

Related Posts