Hey, this is how I set up personal site using Hugo, hosting it on Github pages and linked it to a domain bought through Google domains. Let me know if you have any questions!
- Install Hugo (Mac)
> brew install hugo
> hugo new site SITE_NAME
> hugo new post/test-post.md
- Download a theme and add to project e.g.
> git submodule add [email protected]:mismith0227/hugo_theme_pickles.git themes/pickles
- Use example site to get it up and running quickly
> cp -a themes/THEME_NAME/exampleSite/* .
- Update config.toml to reflect theme change. This may involve changing the themesDir and theme fields. e.g.
> themesDir = "themes"
> theme = "pickles"
- Github pages the site to be in a docs dir. Change config as follows
> publishDir = "docs"
- Run generator - make the site!
> hugo
- Create new repo on github.com
- Init new repo on parent dir and add remote url
> git more add origin REPO_ADDY
- Add, commit and push changes
> git add .
> git commit -am 'init'
> git push origin master -u
- Go to settings for repo on Github > Github pages > Source > select docs
- May need to edit .gitmodules folder and change url to theme homepage rather than repo url e.g.
> [submodule "themes/pickles"]
> path = themes/pickles
> url = https://github.com/mismith0227/hugo_theme_pickles
- Change base url in config
- Commit and push changes
- Buy domain from google domains and follow these [instructions] (https://help.github.com/articles/quick-start-setting-up-a-custom-domain/)