The reason I want to move to Hugo is because it is more modern and flexible compared to my Jekyll site.
The instruction is quite clear on their site https://gohugo.io/host-and-deploy/host-on-github-pages/
First, as always we need to create a github repo, and clone it in our local machine.
Next, we will need to create a Hugo project. I’m using Windows so I will select Extended-edition here. To access PowerShell, from command prompt we can type pwsh
$env:CGO_ENABLED=1; go install -tags extended github.com/gohugoio/hugo@latestAfter install Hugo, we will need to get theme. In this example, I will use Book theme. A simplest way to get book theme is to use git submodule
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-bookThen, inside the config file hugo.toml we will add the theme
theme = 'hugo-book'At this stage, we can see the website locally by running hugo server in pwsh. Now, we need to setup Github Action config to build and deploy the site. We can follow step 2 here.
Also, please don’t forget to change value in hugo.toml
baseURL = 'https://username.github.io/'
locale = 'en-us'
title = "name of your site"
theme = 'hugo-book'
enableRobotsTXT = false --> need to add robots.txt in static folderAt this step, the website is ready to be pushed. If deployment is failed you can try rerun the failure steps. Good luck!