Razzi's guide to hugo
Hugo is a static site generator. I’m kinda learning it cause it seems popular.
install hugo
$ sudo apt install hugo
Refer to the official installation instructions.
create your own hugo site
$ hugo new site quickstart-hugo
Congratulations! Your new Hugo site was created in [...]
$ cd quickstart-hugo
Initialize a git repository (needed since the default themes will be added as a submodule):
$ git init
Initialized empty Git repository in [...]
Add the default ananke theme:
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
Edit hugo.toml to have ananke be the theme:
echo "theme = 'ananke'" >> hugo.toml
You can now run hugo server and it will bind to http://localhost:1313.
If you keep it running, you will notice that changes are reflected immediately, without even having to refresh the page.
For example, try changing the site name in hugo.toml.
adding content
Hugo has a distinction between the theme, basically how your site looks, and the content.
If you follow their tutorial, you can add new content like so:
hugo new content content/posts/my-first-post.md
If you want to edit the homepage itself, you can look in the following places:
- baseof.html is the base html skeleton
- That file links to the site-header.html and the footer.html.
- The main content itself is defined per-page; to edit for example the home page layout you can edit home.html
The baseof.html has a lot of logic to handle various configurations, but for your site you can replace the whole <meta name="description" content="..."> with your own meta description and get rid of all the conditionals.
You can also keep it as a templated variable but remove the conditionals.
If it feels like you’re fighting the system and having to remove a lot of their theme (I personally find all the conditionals in ananke to be unwieldy) you can create your own theme like so:
$ hugo new theme <name>
Then you can set it to be your theme by editing hugo.toml.
Here’s what the theme starts out looking like:

source code
https://github.com/gohugoio/hugo