Install Hugo and theme

brew install hugo
# verify
hugo version
# blog will be the git folder
hugo new site blog
cd blog/themes
git clone
rm -rf er/.git
cd ..
echo 'theme = "er"' >> config.toml

Add the a post and test locally,

hugo new posts/
echo 'Hello Hugo!' >> content/posts/
hugo server -D

Create a repo on Github.

Github Pages provides two types of sites. But,

You cannot choose a different publishing source for user or organization sites. ^1

The following steps assume you’re using “project site”.

If you want to use “user or organization sites”, you need another way to manage your raw contents and public static website.

Change baseURL in config.toml to

Press Ctrl+C to stop server.

Publish to a new Github Repo.

git init
hugo -D -d docs

git commit -am"init"

# change to your own git url
git remote add origin [email protected]:d4rkb1ue/blog.git
git push -u origin

Set your Github Repo,

  1. Go Settings panel -> GitHub Pages section
  2. Change Source to master branch /docs folder

Test your blog in your browser,

*Optionally, you can also change to a custom domain,

  1. Go to your Domain DNS provider, add/change the record for the domain you choose to (d4rkb1ue should be changed to your Github username)
    • For apex domain, make a CNAME record with Name, and Content
    • For subdomain, make a CNAME record with Name blog(anything you want), and Content
  2. edit baseURL in config.toml
  3. echo > docs/CNAME
  4. git push
  5. Visit your custom domain!