Search
Get Hugo set up and installed for the rest of the lessons.
Welcome to this introduction to Hugo tutorial. The goal of this series is to take you from a lion cub with basic web design knowledge to creating your first Hugo website. In this series youâll learn how to set up a Hugo site, the basics of usingHugo layouts, partials, and templating, set up a blog, and finally use data files. By the end of this series youâll have the foundational knowledge to build your own Hugo sites.
Letâs get into your first lesson.
Hugo is a static site generator. It takes a directory of source files and runs a build process over them to generate a purely static website.
What makes Hugo unique is its unparalleled build speeds and strict conventions around layouts, taxonomies, and content. Itâs a static site generator that powers high profile websites such as Letâs Encrypt, 1Password, Linode, and digital.gov.
Hugo is one of the simplest static site generators to install as itâs distributed as a single binary â one of the many perks of a Go program.
If youâre using macOS or Linux, then Homebrew is the easiest way to install Hugo. Once you have Homebrew installed, you can run:
brew install hugo
If youâre on Windows, then the Chocolatey package manager is the way to go. Once Chocolatey is installed, run:
choco install hugo-extended -confirm
Letâs triple check that all went to plan. In your terminal check the Hugo version:
hugo version
If that printed out a version number, youâre good to go! If not, consult the Hugo documentation or reach out on the Hugo community forums.
In your terminal, navigate to the directory where you want your Hugo project to live in you and run this command:
hugo new site my-first-hugo-site
Hugo will set up the scaffolding for your site. Open up your site in your favorite code editor and poke through the contents.
Youâll see a number of directories that probably donât mean anything to you at this stage. Iâll give a brief explanation of each one but donât fret if you donât understand them right now. Weâll be using them over the course of this tutorial which will build familiarity.
Stay tuned for the next lesson where weâll learn the basics of Hugo layouts.
Hugo Beginner Tutorial Series