How to do it...

The steps involved are as follows:

  1. With Hugo successfully installed, let's create a static site. Navigate to your desired folder and use the following command:
hugo new site staticSite
  1. Now, a standard folder structure and the configuration file are created for the Hugo website. By default, there are no themes installed, hence we'll use the Ananke theme to give our website some luster:
cd ./staticSite/themesgit clone https://github.com/budparr/gohugo-theme-ananke.git
  1. The theme is downloaded in the themes folder. Use your favorite editor and add theme = "gohugo-theme-ananke" to the config.toml file.
  2. We'll create our first post using the following command:
hugo new posts/first-post.md
Some themes look for posts under the ...

Get Google Cloud Platform Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.