← Alle notater

Why my portfolio is a static site

My first portfolio was an Express app with MongoDB. It worked, but a portfolio mostly shows text and images that change a few times a month. A server running all day for that is more to maintain, more to secure and more that can go wrong.

What I chose instead

The new site is built with Next.js using static export. Every page is generated once at build time as plain HTML, in three languages. There is no server and no database.

  • Content lives in files: projects in a TypeScript data file, longer texts and these notes in Markdown.
  • Updating is a git push: the hosting rebuilds the site automatically.
  • Nothing to attack: there is no form, no login and no API on the live site.

The trade-off

Without a server, some things need another approach. Redirecting / to /en, for example, is done in the browser instead of on the server. For a portfolio, that is a trade-off worth making.