Hugo is a Static Site Generator that allows you to create a website with little to no coding experience. You can use pre-built themes as a base for your website design. This allows you to focus more on populating the site with your content.
Because Hugo is mostly used for static websites, it’s perfect for creating blogs, portfolios, or documentation sites.
You can easily set up and create a Hugo website using a pre-built Hugo theme. With just a few short steps, you can then add content and pages to your website using Markdown.
How to Install Hugo
You need to install the Hugo static site generator to create, run, and test a Hugo website. According to the Hugo documentation, there are many ways you can install it. Below are some of the options.
Mac
You can install Hugo using Homebrew.
- Open your macOS terminal.
- Install the Homebrew package manager.
/bin/bash -c "$(curl -fsSL )" - Install Hugo.
brew install hugo
Windows
You will need an equivalent package manager for Windows. For example, you can use the Scoop package manager.
- Open Windows PowerShell, which should already be a part of your Windows Operating System.
- If you are installing Scoop for the first time, you may need to set your Execution Policy.
Set-ExecutionPolicy RemoteSigned -scope CurrentUser - Install Scoop:
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') - Install Hugo:
scoop install hugo
How to Create a Hugo Project
To create a new Hugo project, you will need to use the built-in hugo new site command.
- Open your terminal or command prompt. Navigate to the folder where you would like to create your project.
- Execute the hugo new site command:
hugo new site new-hugo-website - Navigate to the location of your Hugo project in your file explorer.
- Open the project folder. You will see that your new Hugo website has the file and folder structure required for your website to work.