Step1. install hugo

install homebrew

/usr/bin/ruby -e "$(curl -fsSL"

then install hugo

brew install hugo

Step2. start a hugo project

make your project folder

hugo new site your_blog
cd your_blog

Step3. add theme

you can find more themes here

mkdir themes

# use git clone
git clone themes/aether

# use git submodule(recommend)
git submodule add themes/aether

enable theme

vim config.toml
# add new line
theme = "aether"

Step4. add post

hugo new posts/ change draft: true then run hugo server -w for local test

Step5. publish to github

Because this is my personal website, so I use User/Organization Pages

  1. create {your-project} repo on your github

  2. create {username} repo on your github

  3. add github page to submodule git submodule add -b master [email protected]:{username}/{username} public(you can use https as git url too)

  4. add shell to project folder, named

    echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
    # Build the project.
    hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
    # Go To Public folder
    cd public
    # Add changes to git.
    git checkout master
    git add .
    # Commit changes.
    git commit -m "rebuilding site `date`"
    # Push source and build repos.
    git push origin master
    # Come Back up to the Project Root
    cd ..
    msg="updated at `date`"
    if [ $# -eq 1 ]
    then msg="$1"
    git add .
    git commit -m "$msg"
    git push origin master
  5. run git commit -am "yout website-hugo commit message " then git push origin master

  6. deploy to {yourname} with ./ "your commit message"


cmd + /