build a hugo site


I built this static site from scratch in about an hour and a half using hugo, hosted it in s3, and re-routed traffic here.


I wanted to revive my personal site after pygotham 2016. It’s been something I’ve been meaning to do anyway so here we are. I have this weird hatred towards ruby and would never want to have to dig into jekyll source code if anything went awry, and I also would prefer to just host this site on s3. So hugo it is.

getting started

I generally followed the instructions here:


brew install hugo
cd ~/src
hugo new site  # build site
hugo new post/
vim  # write this article
git clone base16
hugo server --theme=base16 --buildDrafts  # serve it up

Navigate to http://localhost:1313/.

ship it

Cool. Now let’s ship it.

hugo  # makes site
aws --profile personal s3 cp public/ s3:// --recursive


You’ll need to enable web hosting in your bucket and add a bucket policy so you don’t get shitty 403 errors:

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "AddPerm",
            "Effect": "Allow",
            "Principal": {
                    "AWS": "*"
            "Action": "s3:GetObject",
            "Resource": "*"

That may be way too open (shrug).

Now create a hosted zone in route53 and hook those 4 nameservers up to your domain provider. Wait a bit for DNS to propagate and you’re cookin’ with gas!


edit config.toml to add a default theme so you don’t need to pass that arg in.

hugo automatically refreshes if you edit a .md file.

to fix, a lack of code syntax highlighting, pip install pygments and add PygmentsCodeFences = "True" to config.toml.

other cool stuff

brew install tree

🔥  ~/in/ 🔥  tree -a
├── archetypes
├── config.toml
├── content
├── data
├── layouts
├── static
└── themes

weird bug

Okay and after navigating to my site it looks like a turd. Must be lacking a theme. Tried hugo undraft content/post/ and hugo --theme=base16 but the first just enabled the draft to be visible.

Looks like it’s automatically expecting to pull the css from, which is no bueno right now because i hadn’t re-routed my site yet!