Create a Blog Part 2: Free

See Create a blog Part 1: Simple

Disclaimer: My site is almost free (a small cost of $8.03 was spent to purchase my domain from Cloudflare Registrar

TL;DR

  1. Host your Hugo website files on GitHub
  2. Sign up to Netlify using your Github account
  3. Give Netlify access to only your website repository
  4. Click “New site from Git” button in Netlify
  5. Follow the prompts to configure your site
  6. Go to “Domain settings” configure you custom domain

In my previous blog post I explained how simple it can be to create your own blog website, however the website is only accessible privately on your computer. Unless you are only writing a private diary, it makes sense to share your posts with with anyone on the internet.

Not only can you host your website free (after purchasing a domain of your choice), it is also super simple to do.

The next few steps of the setup assume you have a GitHub account with a repository of your Hugo website. You can find plenty of information on how to host your files on GitHub, however my preferred approach is to use the built in Git support within Visual Studio Code. I love how easy it is to use Visual Studio Code. It even has a built in Markdown preview.

As Hugo generates your site without the need of a database, this greatly increases the amount of hosting providers you can use. After searching around I decided to choose Netlify to host my website. Netlify offer a free plan (Pricing page), which to me, makes them a great choice.

When creating an account with Netlify I chose to sign up using GitHub, this make it super easy for Netlify to access your website files for hosting. You can also configure Netlify’s access to selected repositories.

Once your account is created, click the “New site from Git” button (or head to https://app.netlify.com/start).

Follow the prompts and choose your repository. Netlify will detect that your website uses Hugo. This will allow Netlify to build and serve your website (similar to how you used the “hugo server” command).

Under “Domain settings” for your site in Netlify you can customise your custom domain. You will need to add the DNS configuration specified by Netlify into your DNS provider.

comments powered by Disqus