Stack Show and Tell
Adam B Kaplan
Updated 2017/09/27
This is the first in what I hope to be many posts on this blog. To get things started, I’d like to do a little show and tell of how I built this site.
Code and Content
This site is all static content generated by Hugo.
I just started using it, and I have to say that I’m enjoying the experience so far.
The generator feels very fast (not surprising as it’s powered by Go), and the templating conventions are also easy to work with.
Previewing is easy with the embedded hugo server
, and the live reload lets me iterate very quickly.
The theme I chose is my fork of Ananke. I like having the fork because it (a) lets me use a real example to delve deeper into Hugo’s theming system, and (b) gives me the chance to contribute back to the community. Case and point is the little favicon - I’ve enhanced the theme so anyone can insert their own custom path to their favicon, or serve the favicon in multiple formats. Update: this feature has been merged in. Thanks, Bud!
Previously, I tried using Jekyll as a generator for this site. I found myself at odds with some of the conventions and tooling, as my experience with Ruby is slim.
Hosting
This site is powered by Github Pages, which provides all of the reliability and CDN needed for a static site like this.
I particularly like the fact that I can manage the content and history with git.
The site is configured with a CNAME
to support the custom domain.
I have my own deployment script which uses Hugo to publish the site to Github. The Hugo documentation has excellent step-by-step instructions on how to do this. I took the approach of creating a submodule in Hugo’s public
folder to send my published content to the user site repository.
Domain and DNS
I’m using AWS Route53 for domain registration and DNS. Per Github’s documentation, the DNS is configured to send my domain’s requests to Github’s servers.
AWS is my go-to for cloud hosting, though I am tempted to try Google Cloud Engine one of these days since they seem to have better support for Kubernetes.
Next Steps
Because I’m using a custom domain, Github pages doesn’t support HTTPS. Cloudflare has a great tutorial on how to configure this, and as a bonus I’ll be able to add another tool to my arsenal!