Hugo setup notes

Jan 2, 2020, updated Feb 20, 2020 hugo website notes

This post is a note for hugo setup currently for this site



> hugo new site

specified with


Using minimal bootstrap theme but might consider moving to hugo journal

git submodule lives under instead of root, might not be what I want…?

Now using a forked minimal bootstrap theme to add support for using google-fonts. Followed the gist but with a tweak, minimal bootstramp theme doesn’t load .scss so the font family declaration css lives in head.html instead. See PR for detail?


setup to deploy to S3 bucket; configuration is mainly in [deployment] section within config.toml

S3 bucket was setup with static web hosting but somehow still need to specify an policy to the bucket otherwise hugo deploy will make everything private again and cause 403 on each deploy

relies on IAM configured with aws configure; nothing other than bucket is in the hugo config.

SSL configured via AWS CloudFront with cert issued using AWS Certificate Manager; Follow This AWS step-by-step setup on how to do it. Gotchas

Also need to make sure baseURL in site config.toml is https:// instead of http:// otherwise bootstrap.min.css will be served from non-secure location causing error in Chrome/Brave browsers.

create content

hugo new [path] where [path] format right now should be post/ otherwise the theme doesn’t pick up and create links corresponding posts; also need to make sure .md file extension is there or it might be hard to do things down the road.

Just defined a few archtype template, and when creating new content should use hugo new --kind type [path] where [path] is the same format as above; so for example

> hugo new --kind novel post/novel/

creates a new post of kind novel from template defined under archtypes/

edit and preview

run hugo server -D which should include posts that has draft: true status

other workflow

Currently publishing involves editing on laptop then run hugo to generate site. Thinking how to create posts on mobile.

One possible route

Things to consider with this route:

needs to think about

  1. guestbook?
  2. correct fonts and syntax highlighting for programming related posts; Noto serif doesn’t go well for programming posts. Should think about this more if more technical posts are ever written…