gabe.petitt

This website

I made this website to move my old portfolio off Google Sites. With a blank slate I can reformat everything and present my projects in a more detailed, professional light.

I started the site partially as a project in understanding how to host an HTTPS service. I constructed a Docker compose configuration to build the site and host it behind an nginx reverse proxy and a one-off certbot container for generating and renewing certificates.

In its early form, the site was just hosting a static directory of pages. Since I was familiar with Go HTML prototypes, I opted to write a small Go backend to avoid rewriting the same HTML between a large number of similar files.

However, I didn't want to manage manually adding entries to blog homepages, linking the sites, creating new html files, etc. As such, I modified the backend to automatically generate blog directories, using the files within a directory and a template to populate a list of entries. It stacks templates written to byte slices to convert chains of content into binary data to be written to higher-order templates until all fields are given content.

This was a great, fun exercise in becoming more comfortable with Go. It's a pretty simple concoction--all it does, really, is read files, change some stuff, and write the contents--but it involved a variety of language features which I needed to become familiar with.

The source for the project is contained below.

src