Hugo is a framework written with Golang for building website.

I told my wife I wrote something on my blog. After heard that, she said she wants to build a blog and start writing. So I spent a few hours on setting up a local hugo site and deployed it on Github pages.

Here are all the thing you need to do:

  • A github account, if you didn’t have one, you need to sign up
  • Git installed on your local machine
  • Install hugo
  • Head over to GitHub and create a new public repository named username.github.io, where username is your username (or organization name) on GitHub
  • Generate a website on local machine
  • Push your local reposity to github
  • Add a github workflow
  • Config reposity’s page setting

If everything goes well, you will see your blog online https://YourGithubUsername.github.io/

If you encounter a 404 error after deploying your website on github pages, your can adjust the workflows in Action or change the setting of page of the reposity.

Reference

  1. Quickstart for GitHub Pages
  2. GitHub Pages
  3. Host on GitHub Pages