Skip to content

Instantly share code, notes, and snippets.

@nareshganesan
Created January 22, 2016 07:46
Show Gist options
  • Save nareshganesan/cf76cdd6428b1ef0d8e4 to your computer and use it in GitHub Desktop.
Save nareshganesan/cf76cdd6428b1ef0d8e4 to your computer and use it in GitHub Desktop.
Hugo Installation + Tutorial + Useful commands
# Hugo is a static site generator from spf13.
# it is really simple, elegant and easy to install once we get around it.
# The following commands are mostly tested in OSX
brew install hugo
mkdir hugo-project
cd hugo-project
hugo new site .
# Runs hugo server in debug mode useful while learning
hugo server --verbose
# Create our own hugo theme
hugo new theme theme-name
# creates all your static files other than content to your public folder.
hugo --verbose
# Important templates for hugo
# Home page template
# 1. themes/theme-name/layouts/index.html
# Single page template (article / post / blogpost)
# 2. themes/theme-name/layouts/_default/single.html
# List page template (article / post / blogpost)
# 3. themes/theme-name/layouts/_default/list.html
# Please see the Hugo documentation on template rendering for all the details on determining which template to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment