How To Publish Hugo Website To Gitlab Pages

Quick guide to publish your Hugo-based webpage on the Internet.

December 26, 2016
hugo gitlab

This is a quick guide showing you how to deploy your website to Gitlab Pages.

Let’s get busy

Go to your projects settings (Edit settings) and edit the Project name and Path to Change username with your Gitlab username.

  • Run this command in your terminal (use your username):
$ git clone

If git is not installed: sudo apt-get install git

Change the name of the cloned project directory to

If you have not configured git on your computer, do that now with:

$ git config ""
$ git config "Your Name"

Open config.toml which is inside of your project and change the baseurl value to baseurl = ""

You are now prepared to commit and push changes to your project.

$ git push origin master

Fill in your login info if requested and go to If your page is not visible yet, wait a couple of minutes, because it may take some time to show up.

comments powered by Disqus