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.
Author
Released
12/14/2018- 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
Duration
Views
Related Courses
-
Learning Git and GitHub
with Ray Villalobos1h 21m Beginner -
AWS: Storage and Data Management
with Brandon Rich4h 25m Intermediate
-
Introduction
-
1. How Static Sites Work
-
How static sites work1m 55s
-
Advantages of static sites1m 20s
-
Choosing a static site tool2m 13s
-
-
2. Set Up Hugo
-
Why Hugo?43s
-
Install Hugo46s
-
Install Git29s
-
Create a new Hugo site1m 49s
-
Add a Hugo theme1m 29s
-
The site configuration file1m 58s
-
-
3. Build a Website
-
Add a post1m 52s
-
Add a page2m 17s
-
Add static content2m 45s
-
Customize the error page1m 28s
-
Generate the site files1m 41s
-
-
4. Prepare for Publishing
-
Set up GitHub1m 46s
-
Set up Travis CI3m 24s
-
5. Deploy via FTP
-
Deploy via FTP overview2m 2s
-
Set up Node and npm1m 40s
-
Connect to the server7m 21s
-
Collect the local files4m 51s
-
Upload the site content2m 43s
-
FTP next steps1m 2s
-
-
6. Deploy to AWS
-
Deploy to AWS overview1m 53s
-
Set up Amazon S31m 54s
-
Set up Amazon CloudFront4m 8s
-
Configure DNS1m 24s
-
Define an AWS user3m 24s
-
Deploy to AWS with Travis CI4m 16s
-
-
7. Deploy with Netlify
-
Conclusion
-
Deployment recap32s
-
Next steps33s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Create a new Hugo site