From the course: Learning Static Site Building with Hugo

Create a new Hugo site

From the course: Learning Static Site Building with Hugo

Start my 1-month free trial

Create a new Hugo site

- (Narrator) Okay now we're ready to create a new Hugo project. Open up the terminal or shell on your computer I'll use PowerShell again and then navigate to the place where you want to store your site files. I'm going to stay here in my documents folder. Then I'll run hugo new site and provide a name for the new project. I'm gunna call this awesome static site. This command creates the new folder called awesome static site and that folder has a number of files inside. I'll cd into that folder by starting to type the name and then just hitting Tab to finish it. If I list the contents of this folder I'll see a number of files and a number of folders inside. What I want to do next is open up this folder in my favorite text editor or code editor. I'll use Visual Studio Code but you can use Atom, Sublime, Notepad or whatever you're comfortable editing text files in. If you don't have a favorite editor you can try downloading Visual Studio Code and code.visualstudio.com it works really well for editing these types of files. Right now the content folder is empty. Hugo created the scaffolding and the structure of the site but there's no content, themes or templates here yet. This is a good point to initialize a Git repository for this project. I'll switch back to PowerShell and I can run git init and git status to see the untracked files. Then I can run git add -- all and then git commit, with a commit message like, create initial project. I'm using sign commit, so I need to enter a pass phrase but if you're using Git for the first time you probably won't have to do this. This will check all the scaffolding into git and get us ready for the next step. Now we need to add a theme and some content to the site.

Contents