This site’s stack
tldr: Static site with Eleventy + Next.js for ocassional API/backend features.
After publishing my first piece on why I created this site, I thought it was only fair to talk a bit about the stack behind it. After all, I’m a software engineer.
My usual go to setup looks something like this:
- Next.js
- TypeScript
- PostgreSQL
- VPS
It shifts a little depending on what the project needs, but overall I tend to gravitate strongly towards TypeScript.
For this project, the main goal was to build something lightweight, long lasting and that required virtually no maintenance. On top of that, I wanted the content to be static.
Ideally, I was thinking about writing full HTML pages like I used to do when I was a kid. But what if I wanted to change the header, or the footers, or migrate content? Also, I wanted to focus on writing, not HTML tags. So I needed a static site generator that had Markdown support.
When thinking about those tools, the classic option immediately came to mind: Jekyll.
But I try to keep my day-to-day stack as simple as possible, so I decided to stay within the JavaScript ecosystem. That’s when I discovered Eleventy.
A couple of templates and CSS files and that’s it. This is the result you are seeing. But it doesn’t end there...
At the same time, I wanted to keep the possibility of adding a small API or backend if needed. That pushed me towards adding Next.js for API routes, but serving the static files as default.
The build setup is straightforward: Eleventy generates the site, the output is copied into the public folder of Next.js, and that’s the whole flow.
For hosting this site I went for the cheap and easy option: Vercel. I don’t need much. However, the Dockerfile is ready for migrating anytime to one of my VPS.