Using Hugo

Follow these 3 simple steps to start working on your Hugo website.

  1. Install Hugo locally
  2. Configure Hugo - this 70 second video tutorial will walk you through these steps
  3. Choose a Hugo template that's best for your needs

To test that everything is functioning correctly, you can run your website locally using Hugo's server command.

To test the website static generation, simply run the hugo command from the root project folder; a public folder will be created with all HTML generated content.

At this point, you can enable Travis CI to run the command and deploy the generated HTML to the gh-pages branch in a continuous way:

.travis.yml
# Install hugo CLI tool
install: true
before_install:
- wget https://github.com/gohugoio/hugo/releases/download/v0.49/hugo_0.49_Linux-64bit.deb
- sudo dpkg -i hugo*.deb
- hugo version

# Run hugo CLI tool, updates the docs/ folder
script: hugo

# Configure Travis CI integration with Github Pages - https://docs.travis-ci.com/user/deployment/pages/
deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GH_TOKEN
  name: $GH_USERNAME
  email: $GH_EMAIL
  local_dir: public
  target_branch: gh-pages
  on:
    branch: master

Check github.com/gohugoio/hugo/releases to update the URL in the before_install command with the latest version.

Need help? Email help@finos.org we'll get back to you.

Content on this page is licensed under the CC BY 4.0 license.
Code on this page is licensed under the Apache 2.0 license.