When I started building my personal blog with Nuxt, one of the first decisions I had to make was how to store my content.
At first, Nuxt Content seemed like a good option. Writing articles in Markdown sounded simple, and I wouldn't need to worry too much about database setup.
But there was one thing I needed: a custom admin panel where I could manage my articles, categories, and tags.
That made me reconsider my choice.
Why I Didn't Choose Nuxt Content
Nuxt Content is a great option for projects where content lives in files, such as Markdown documents stored in a Git repository.
However, my blog needed a different workflow.
I wanted to create and edit articles directly from my admin panel. Since I also planned to deploy the application to a serverless environment, writing Markdown files at runtime wasn't a reliable approach for my setup.
I didn't want to build my content management system around a storage method that didn't fit how I planned to use the application.
So, I decided to use a database instead.
My Choice: PostgreSQL and Drizzle ORM
I chose PostgreSQL for storing my blog data and Drizzle ORM for working with the database.
My initial schema included tables for:
- Articles — titles, content, slugs, publication status, and SEO information.
- Categories — separating tech articles from personal posts.
- Tags — organizing articles by topic.
- Users — storing user information for authentication and administration.
- Comments — leaving room for future discussions.
I also used a many-to-many relationship between articles and tags, since one article can have multiple tags and one tag can belong to multiple articles.
This approach gave me more control over how my content was organized and managed.
Of course, it also meant taking responsibility for database schemas, relationships, migrations, and queries.
It Was a Trade-Off, Not a Perfect Solution
Choosing a database didn't automatically make everything easier.
I had more things to configure and maintain than I would have with a file-based content solution. I also needed to think carefully about my data model before building more features.
But for my use case, that extra work made sense.
I wanted a blog that could grow beyond publishing Markdown files. I wanted an admin panel, structured content, authentication, and room for features I might add later.
Using a database gave me the flexibility I needed for that direction.
That doesn't mean Nuxt Content is the wrong choice. If your website mainly contains static articles and you enjoy managing content through Git, it may be exactly what you need.
For my project, though, a database was a better fit.
What I Learned
This decision taught me something simple: the best technology isn't always the one with the easiest setup. It's the one that fits the project you're actually building.
Before choosing a tool, I now try to think beyond the first feature I want to implement.
How will I manage the content? Where will the application run? What might I need to add later?
These questions helped me make a decision that felt right for my project, rather than choosing a tool just because it was convenient at the beginning.
I'm still building and improving this blog, so I expect to revisit some of these decisions as the project grows.
For now, PostgreSQL and Drizzle ORM are working well for the direction I want to take.
What about you? When building a blog with Nuxt, would you choose Nuxt Content or a database? I'd love to hear your reasoning.
This article is part of my Database Series, where I share what I learn about data modeling, database decisions, and building real applications.
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.