A new hope
After years of neglect I am reviving this homepage. First order of business is to update the static site generator I am using. Previously this site was generated by Jekyll. It has been a long time since I used Jekyll outside of Github pages so I decided it is time to do a bit of research.
The only two contenders I considered were:
- eleventy, just because I knew that it was being used for one of the Chrome DevRel sites and it is a fairly new addition to static site generators.
- hugo, because I heard that it is fast and I like fast.
I tried eleventy first given that it is more recent but I not surprising this whole npm install process was very flaky and I realized I am spending too much time trying to configure it properly. I decided I don’t want to get side-tracked so I switches gear to hugo.
Hugo was super easy to install and worked out of the box with no extra configuration. It also comes with a built-in Jekyll import tool which meant I spent 5 mins on setup and migration and the rest of the hour changing the theme CSS which is exactly what I wanted to happen.
Tech that just works. We need more of that.
I am going to push this new version up.
Next steps
-
Figure out what I need to change in my S3 deployment to support HTTPS.
Update (2021-03-05): This turned out to be easy. I simply enabled cloudflare free tier to be CDN for this site. It was dead simple and comes with a SSL certificate. I could have used AWS Amplify but I suspect it is not as simple as this and I don’t have any need for any of its other features yet.
-
Setup automatic gitlab/github action to deploy to S3 when I push.
Update (2021-03-05): My initial plan was to leverage gitlab CI. Use hugo to build, then use aws cli to upload to S3. After spending an hour trying to setup a docker image that contains both hugo and aws cli, I found out hugo has a built-in S3 deployment tool as well. This tool is a joy. So my depolyment setup is now the following gitlab CI config that everytime I push to main branch, builds and deploys to S3 using a docker image that comes with hugo.
Here is my
gitlab-ci.yml
deploy: image: name: klakegg/hugo:ext entrypoint: [""] script: - hugo - hugo deploy
P.S. To be fair I suspect that eleventy setup is likely to improve over time and some of its setup flakiness is probably the result of Javascript dependency situation.
P.S.2. It will be tragically funny if the only thing I end up publishing on this blog to be this post.