This site was created so I could have a place to document my different experiments. This site itself is also an experiment, so what better place to start. I have had an abandoned blog in some form for a long time. I’ve used Wordpress and Ghost. Both required maintenance, which I am looking to avoid completely. During my search for a new platform I landed on Hugo, a static site generator.
Hugo uses Golang’s excellent templating library to generate static sites extremely quickly. A platform like Wordpress requires an entire LAMP stack, while a Hugo site can be hosted by any single web server like Nginx, or even an S3 static site. I am hosting this blog directly off S3 and using Cloudfront CDN.
Getting up and running on a mac is a very simple process:
# Install Hugo brew install hugo # Create a new site in current directory hugo new site . # Create first page of content hugo new post/this-is-a-post.md # Run server and build drafts hugo server -D
How does Hugo work?
Hugo uses Go’s template package to generate a static site. A static site has no dynamic content, meaning everything is rendered into html before it is deployed. There is no need for an application server. This allows us to serve it up in a very efficient manner. We are trading build time for run time, although it’s not much of a tradeoff if you are running a small blog such as this.