Skip to content

Instantly share code, notes, and snippets.

@thoughtful-solutions
Last active March 17, 2020 12:59
Show Gist options
  • Save thoughtful-solutions/f2f2a054634a4ccb10ed3445868834da to your computer and use it in GitHub Desktop.
Save thoughtful-solutions/f2f2a054634a4ccb10ed3445868834da to your computer and use it in GitHub Desktop.
Static-WebSite-with-Hugo.md

Construct hugo

$ mkdir src
$ cd src
$ git clone https://github.com/gohugoio/hugo.git
$ go build --tags extended
$ cp ~/go/bin/hugo ~/.local/bin
$ hugo version
Hugo Static Site Generator v0.68.0-DEV/extended linux/amd64 BuildDate: unknown

Create a test website

$ mkdir hugo-tst
$ cd hugo-tst/
$ hugo version
$ hugo new site quickstart

Now ensure it is under git control

 $ cd quickstart/
 $ ls
 $ git init

Now add a Theme to the website

$ git submodule add https://github.com/themefisher/Influencer-hugo themes/influencer-hugo
$ echo 'theme = "influencer-hugo"' >>config.toml 
$ git add -A
$ git status
$ git commit -m 'initial config and theme'
$ git status

Now ensure we have Cache-Dir configured to work

$ mkdir ~/Cache-Dir
$ echo 'CacheDir = "/home/user/Cache-Dir/"' >>config.toml
$ git commit -m 'configure Cache-Dir'

Add Content to the Website

$ hugo new posts/my-first-post.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment