I will outline how I set up my Hugo installation which varies slightly from Hugo’s quick start guide.

Install hugo.exe

  1. Create a new folder C:\Program Files\Hugo
  2. Download the latest zipped Hugo executable from Hugo Releases.
  3. Extract zip file contents into the folder C:\Program Files\Hugo.
  4. Update the PATH environment variable to include C:\Program Files\Hugo.
    • I used the control panel to do this.
      • Control Panel\System and Security\System
      • Advanced system settings on the left
      • Advanced tab
      • Environment Variables button
  5. Open a command prompt and type hugo help to verify it is working.

Create a new website

  1. Create a new folder for the source code C:\repos\hugo
  2. Open a command prompt to create a new website, add a theme, and create a content file.
1
2
3
4
5
6
cd C:\repos\hugo
hugo new site myblog
cd myblog
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
hugo new posts/getting-started-with-hugo.md
  1. Add the theme to the site configuration file, config.toml.
    • Add a new line with the text theme = "ananke".
  2. Add content to the content file, content/posts/getting-started-with-hugo.md.
  3. When you are ready to deploy the content, change draft: true to draft: false in the content file.

Start local server

  1. Start the local Hugo server to test, hugo server, use -D to include drafts.
  2. Navigate to the new site at http://localhost:1313/

Build static pages for deployment

  1. At the command prompt type hugo
  2. The output will be in the public folder.
  3. Copy the files to your web host. I’m using an S3 bucket on AWS to host my site.