How to set up the hugo

February 2017 · 1 minute read
  • Share


What’s Hugo?

It’s a static site generator written in Golang. As a similar static site generator, Jekyll, Middleman, etc. There are 3 major reasons for choosing Hugo:

Install the hugo.

If you are using a Mac.

$ brew install hugo

Create a site.

$ hugo new site ${site_name}

Install some theme.

$ mkdir themes
$ cd themes
$ git submodule add${user_id}/${repos_name}.git

Post articles.

$ hugo new ${}

Preview site.

$ hugo server -t ${theme_name} -w

Generate a page.

$ hugo -t ${theme_name}


theme = "${theme_name}" # Apply theme.
canonifyurls = true # It's absolute path based on baseurl, not a relative path.
publishDir = "${dir_path}" # Directory path to publish


comments powered by Disqus