DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for What is the best pattern for a future-proof Next.js portfolio?
Arthur Borges
Arthur Borges

Posted on

What is the best pattern for a future-proof Next.js portfolio?

I have been learning next.js for the past few days, but still doing the tutorial. I have plans to build a blog/portfolio with it, in which each page/route will be a different React Component that I will be showcasing.

Thinking about that, what is the best design pattern or architecture that I can use? My plan is to publish a new page/component every day, so it will be growing very fast in size/number of pages. Should I use a database to fetch the data of each Component/post? Store in Markdown? Let it stay in /pages directory? Any other approach?

Top comments (3)

Collapse
hangindev profile image
Jason Leung πŸ§—β€β™‚οΈπŸ‘¨β€πŸ’»

Hi Arthur! I also build my blog with Next.js. I used to use MDX to write my posts and I'd recommend you to check out MDX if you are writing a lot. MDX lets you write JSX and add components in your Markdown documents so you can keep things flexible. Clone this example to try using MDX with Next.js if you've never used it before. πŸ˜‰

If you are the only one who is writing, a database/CMS may not be necessary since it requires extra time to maintain, especially when you are trying to create a new component every day.

Keep things simple. You may even open-source your blog in Github to showcase your codes. Start now and you can always update your site later! Good luck mate!🍻

Collapse
arthurborges profile image
Arthur Borges Author

Thanks a lot for your detailed response, Jason! I'll definitely try MDX. Also your blog is very cool!!

Collapse
hangindev profile image
Jason Leung πŸ§—β€β™‚οΈπŸ‘¨β€πŸ’»

Thanks! You're welcome. Looking forward to seeing your blog!

Find what you were looking for? Join hundreds of thousands of developers on DEV so you can:

Β 
🌚 Enable dark mode
πŸ”  Change your default font
πŸ“š Adjust your experience level to see more relevant content