From the course: Learning Static Site Building with Hugo

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Generate the site files

Generate the site files

From the course: Learning Static Site Building with Hugo

Start my 1-month free trial

Generate the site files

- When you are ready to deploy your site to the web you need to run a command to tell Hugo to generate and save all the files that make up the site. The command you need to run is simply Hugo. This tells Hugo to build all these site files and save them in a new file called Public. Public contains folders and files for each one of your posts and pages. Hugo also copies over everything from a static folder and merges your static content with any images or JavaScript files provided by the theme. You can see here that Hugo copied over the custom images we added as well as created files for everyone of the pages and posts we added to the site. The contents of the public folder is the entire website. All we have to do now is upload it to a web server. Before we go off and deploy the site there is one thing to do If we check the git status of this repository we can see the public folder shows up here We don't actually want git to keep track of the files in the public folders since they will…

Contents