Hi there! Internet Explorer is no longer supported.

Please use a modern web browser such as Firefox, Chromium or Edge. Thank you!

Deploy Site

How to deploy a site using Hugo.

Hugo generates static websites, allowing for flexible hosting options. This page provides guides for deploying a site using Trigo on various platforms.

GitHub Pages

GitHub Pages is the recommended way to deploy and host your website for free.

Warning

In your repository settings, set the Pages > Build and deployment > Source to GitHub Actions:

Image

By default, the above GitHub Actions workflow .github/workflows/pages.yaml assumes that the site is deploying to https://<USERNAME>.github.io/<REPO>/.

If you are deploying to https://<USERNAME>.github.io/ then modify the --baseURL:

.github/workflows/pages.yaml
54
55
56
57
run: |
  hugo \
    --gc --minify \
    --baseURL "https://${{ github.repository_owner }}.github.io/"

If you are deploying to your own domain, please change the --baseURL value accordingly.

Cloudflare Pages

  1. Put your site source code in a Git repository (e.g. GitHub)
  2. Log in to the Cloudflare dashboard and select your account
  3. In Account Home, select Workers & Pages > Create application > Pages > Connect to Git
  4. Select the repository, and in the Set up builds and deployments section, provide the following information:
ConfigurationValue
Production branchmain
Build commandhugo --gc --minify
Build directorypublic

For more details, check out: