This site began with the concept of a simplified static site generator, which resulted in writing accelerator first.
The goal of this site was to replace a traditional dynamic system with raw static content and redirect the domain after.
One major consideration was taking advantage of content delivery using AWS S3 and CloudFront services for any static or binary contents. This provides a significantly greater degree of scalability, in that I can create as many servers as necessary to deliver the websites static content, while binary/static files all come from one place.
Right now that includes images, fonts, and some static third-party css and javascript. Because my own css and javascript are still under construction it made sense to include them using git-hash-versioning to ensure the browser won’t cache incorrectly. In the future I could continue to version but also minify and upload the changed files to S3 so I could benefit from using it for all “static” files.
Another advantage to moving away from a dynamic website is that when dealing with basic static html we can enable simple caching directly through nginx without concern for other layers; there is no CMS to contend with or concern for “immediately up-to-date” contents.
I decided to implement https
because I intend to use the domain for experiments from time to time, and also because it’s free.
Finally, I am using git, as well as github, as a means of version control for my website now. This allows me to enable a simple cronjob to pull changes hourly, and know that I can update my site from any computer by simply pushing new static html to the github repository. This also means I have a backup, and a very simple distribution and deployment method.
I have two considerations for the next steps:
The custom tool I built was more of a proof-of-concept, and while neat it isn’t the best option out there. Another tool built in go with much greater stability is available, and might be worth trying.
Right now I commit the parsed html directly to the repository, and while this means deployment is a simple git pull
, it also means that the compiled version of every file is taking space up in the repository redundantly.
Finally, I might move the css and javascript to the same S3 CDN that I use for images.
updated on 2017-07-18