Learn how to create a new Hugo project from scratch using the Hugo command-line tool. Nate shows the generated files and recommends a text editor to use for the project.
- (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.
- Advantages of static sites
- Installing Hugo and Git
- Creating a new Hugo site
- Building a new website
- Adding posts, pages, and static content
- Publishing your static site
- Deploying via FTP, AWS, and Netlify
Skill Level Beginner
AWS: Storage and Data Managementwith Brandon Rich4h 25m Intermediate
1. How Static Sites Work
2. Set Up Hugo
3. Build a Website
4. Prepare for Publishing
5. Deploy via FTP
6. Deploy to AWS
7. Deploy with Netlify
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.