Setting up a static, fast, free blog with Hugo

It was easier than I thought. For about $1 a month a website of my own with automated deployments.

Best part is I paid all the money towards yearly domain price of $12. Hosting and deployment of my site came for free.


The setup is easy and if you follow below steps it should be easy to get done.

Steps for creating a website

  1. Download and install hugo.
  2. Choose a theme from the showcase.
  3. Generate your website.

Steps to host the website on GitHub.

  1. Create a GitHub account.
  2. Create a folder called «docs» directly under your website folder.
  3. Add the contents of your public folder generated in the website creation step(this contains the website) to docs.
  4. Create a new repository on github and add all the folders to github.
  5. Go to settings of your repository and browse to GitHub pages section.
  6. Choose the source as your master/docs folder as shown in the image above.
  7. Github will automatically generate a blog url for you.
  8. If you want to setup a custom domain then follow these instructions.

Steps to host a website on Netlify

  1. Follow steps 1 and 4 from «host the website on GitHub».
  2. Create a netlify account.
  3. Click on Add a new project.
  4. Click on github and select the repository created in step 1.
  5. Select branch as «master», enter Publish directory as «public» and Build command as «hugo» as shown.
  6. Click on «build your site». If all goes well, your site will be built and deployed.
  7. Click on «view your site» to see your site.
  8. You can setup a custom domain by following these instructions.

Leave a comment if you have questions and I will be happy to help.