Before create your blog, make sure you have these steps completed:

Follow these steps to put your website on GitHub

  1. Now it’s time to create a repository on GitHub: <USERNAME>.github.io, this is the repository will contain the fully rendered version of your Hugo website.
  2. Make your website work locally(hugo server -t <YOURTHEME>). Open your browser to http://localhost:1313.
  3. git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public. This creates a git submodule and a folder called ‘public’ , perhaps you will see a warning related to the folder recently created, please ommit it. Now you can see an empty folder ‘public’.
  4. run hugo, once done press CTRL + C and the ‘public’ folder will have all the content rendered
  5. Here you have a script to automate all the process, once you create a new post you can execute this script: Script on GitHub