Skip to content
daobee edited this page Sep 1, 2016 · 1 revision

refDocs

gohugo.io

Prerequisite

  • Git
  • Go
  • export GOPATH=$HOME/go

Download

  1. Download Hugo Releases
  2. Installing Hugo (binary)
    or
    go get -u -v github.com/spf13/hugo

Make sure Hugo is in your PATH (or provide a path to it). Test this by:

hugo help

Generate site

hugo new site /path/to/site

Generate contents

hugo new about.md //new page is at content/about.md
hugo new post/first.md //new page is at post/first.md

Installing Themes

cd themes
git clone URL_TO_THEME

Deploy or Generate static pages

hugo --theme=urtheme --baseUrl="http://ur url/"

Push

cd public
git init
git remote add origin https://ur git url
git add -A
git commit -m "first commit"
git push -u origin master