Installing Hugo on Windows

I’m going to be using Chocolatey to install Hugo. The install page for chocolatey is here: https://chocolatey.org/install.

  1. Run Get-ExecutionPolicy . Mine returned restricted. I then ran Set-ExecutionPolicy AllSigned. Img1
  2. Run the following command Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) Image alt
  3. Run choco Img2
  4. Success!

Install Hugo:

  1. Run choco install hugo-extended Img2

Install Git:

  1. Run the .exe installer from https://git-scm.com/download/win

Build a site! (I’m going to be using the Poison theme: https://themes.gohugo.io/themes/poison/)

  1. Open up a PowerShell terminal
  2. Navigate to the folder location for your new blog Img4
  3. hugo new site joshuakrizek
  4. cd joshuakrizek
  5. git init
  6. git submodule add https://github.com/lukeorth/poison themes/poison
  7. echo "theme = 'poison'" >> config.toml (This errored out on me and I opened up the config doc manually, removed the corrupted line and saved the file) Img5
  8. hugo server Img6
  9. Open up http://localhost:1313/ in a browser Img7
  10. Success!

(Apologies for the Espanol in the screenshots. I’m trying to learn)

References:

https://gohugo.io/getting-started/quick-start/

https://gohugo.io/hosting-and-deployment/hosting-on-github/

https://www.mytechramblings.com/posts/create-a-website-with-hugo-and-gh/