Prepare Your Site
This doc is outdated. For up-to-date examples, please follow this sample repo. In this post, we are going to create a hugo site from scratch. Then, we will configure it with Toha theme, make it multilingual, add some example posts. At the end of this post, you should be able to run a fully functional hugo site with Toha theme locally. If you want a head start, you can just fork hugo-toha/hugo-toha.
Deploy site in Github Pages
In this post, we are going to deploy the site we have created in previous post in Github Pages. At first, make sure that your repository name is <your username>.github.io. Then, commit any local uncommitted changes and push into Github. Create gh-pages Branch At first, create a new branch named gh-pages. Github will automatically set respective configurations for Github Pages when it see a branch with this name. # create the gh-pages branch $ git checkout -b gh-pages # push the source branch into Github $ git push gh-pages gh-pages Enable Github Action We are going to automate the deploying process using Github Actions.
Deploy site in Netlify
Netlify offers an excellent and easy process for deploying hugo static site. You can deploy your site in matter of few clicks. Unlike Github Pages, you can name your repository whatever you want. You can also customize the site URL. In this post, we will show the step-by-step process of deploying a hugo site with netlify. Add Netlify Configuration At first, create a netlify.toml file at the root of your repository and add the following configuration there:
Automate Theme Update
This doc is outdated. We will be updating the doc soon. You might want to keep your site up-to-date with the latest version of theme to enjoy the latest features and fixes. In this post, we are going to setup a Dependabot Github app to automatically update the theme version. The app will check daily if there is any update in the submodules. If it finds any update in the theme, it will create a PR updating your site to the latest theme version.