Hugo

Hugo

Vitae is a blog theme for Hugo that focuses on your content.

21 Oct 2016

Host static contents with Github Pages

Github Pages is a static site hosting service designed to host your personal, organization, or project pages directly from a GitHub repository.

However from repository settings / Github Pages, only master, master/doc option can be selected.

Actually there is another way to quickly host your repo’s static content with command line.

Create a gh-pages branch, push your static contents to this branch. fire up a browser then open http://username.github.com/repo

git checkout --orphan gh-pages  
git reset --hard
echo hello github pages > index.html
git commit -am "create index.html"

when working with hugo, it’s really helpful to create a little script for deploy contents from ./public generated by hugo command

read more details on hugo documentation