Lesson Overview


Build a production version of your site to deploy to the cloud.
2 minutes 232 words

Congratulations on creating your new site! ๐ŸŽ‰

You have accomplished to build something completely from scratch, now it’s time to show it to the world!

Before we begin deploying our servers, we need to understand the build process.

The Process

The Hugo build process is simple in theory, we run a command in our terminal and instead of starting a local development server, we tell Hugo to build a production site.

What is a production site? It’s a site that is built with servers in mind, every code file we wrote gets analyzed and stitched together so it’s ready for the world.

What Hugo does is reads our template files and all our content from the content folder and it starts merging them together - the end result is one folder with all the files needed to be transferred to a web server.


Before running the production build make sure that your baseURL in config.toml looks like this: baseURL = "/".

To run the production build, head over to your terminal, cancel the dev server if it is running by hitting ctrl-c, then write hugo --gc --minify. This will quickly generate your new site files and place them in the public folder in your project. You can open them and explore the output if you like but it’s not necessary.

These are the real files we will upload to the cloud.

Share this page