Welcome! This site hosts details of projects I've worked on, along with a Blog of software engineering concepts I've learned and would like to share. Developing this website was a fun little challenge itself, as I wanted to put together something that was both convenient to keep updated, and dirt cheap to host. Here's an overview of how I've managed to do this.
Choosing a tech stack was a fun exercise and finding the most cost effective way to produce and serve a modern blog site. It was important to me to have some form of content management system (CMS), but the site should overall be as cheap as possible to run and host. I've used systems like Opencart in the past, where I was able to hack together a CMS from an e-commerce platform. This works alright if you plan on having some kind of shopping system in your website but locks you in to using PHP and we're looking for something a bit more modern.
Enter Strapi, a "headless" CMS which lets you put together a collection of content, and serve it with a simple REST API. With this system I could split the layers of content creation and content presentation, allowing me to go with any Frontend stack I want. For this I chose NextJS.
The most important feature of NextJS for this website is Static Site Generation (SSG). This feature of NextJS allows me to compile a fully static website with all of the content I've written with Strapi. The magic happens with the special NextJS function getStaticPaths() that allows you to define the list of content to crawl at compile time. When you run yarn build, NextJS crawls the pages retrieved in getStaticPaths() and renders out HTML files for each post. With this setup, we can fully host the site with a lightweight server like Nginx, no need for a back end server language!
More details about how exactly I host this site as cheaply as possible, as well as details on how I automate updates to the site will be coming up in future posts!