Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 2.18 KB

HOWTO.md

File metadata and controls

68 lines (47 loc) · 2.18 KB

How we did it

Here is a short description of what we did to set up our site to our organization page

On Github

  1. Create a <docs repository> to hold content and source files.
  2. Create a <organization name>.github.io repository that will contain the fully rendered version of the Hugo website.

Requirements

You need to have Git and Hugo installed on your pc.

In a capable terminal

mkdir <docs repository> && cd <docs repository>
hugo new site .
git init
git submodule add https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock
git submodule init
git submodule update
cp themes/docdock/exampleSite/config.toml .

Edit the config.toml file as needed. Specifically the following should read:

theme = "docdock"
# themesdir = "../.."

On updating the hugo binary

After downloading the new hugo binary in the bin folder, it is important to make the linux binary executable

git update-index --add --chmod=+x bin/hugo

Then commit and push as usual

On updating the themes submodule

cd themes/docdock
git pull origin master
cd ../..

You should test your pages with the new version of the theme: ./bin/hugo server

git status
git add themes/docdock
git commit -m "Update themes submodule"

Automatic deploy of static content to our site with Travis

Essentially what we did was to set up travis to generate static content with hugo and push the new content to our site. This is made possible by the .travis.yml script. Note that you will have to generate a secret key for Travis at GitHub and add it you the travis-configuration. For a good step-by-step description, check this blog.

Credits