Hosting your Hugo Site

27 April, 2019

What?

Hugo is a static site generator which can be used to make fast, accessible and overall fast web pages.

This page will show you how to get your Hugo site up and running either on a web server of yours or on Github pages.

How?

First Steps

  1. Fully delete the public folder inside of your Hugo site.

  2. In the terminal type hugo (this will re-build your site in the public folder).

Down below there will be different tutorials depending on whether you want to use a web server or Github pages.

Web Server / Apache

  1. Go into the public folder and upload its contents onto your web server. (Upload to the htdocs folder for apache)

Github Pages

Note: Replace <username> with your Github username. Click on header link to view in-depth tutorial on Github’s site if you are new to Github.

  1. Make a public repository on Github named: <username>.github.io

  2. Upload the contents of the public folder to the github repository.

With GitHub pages you aren’t just limited to hosting a Hugo site, you can host any site you want, you just have to be willing to have the repository public and allow anyone to view/download its contents.