This step will download the specified version of Hugo and run this over the source code to generate the static version of your site. This can then automatically be deployed using other steps.
To speed things up, this step has the latest two versions of Hugo already installed thereby skipping the download part of the step.
If you are new to Wercker, there is a full tutorial on how to use this step in combination with an automatic deployment step in the Hugo documentation.
This step does not require any specific container.
Version 2.0.0 of this step was released using Wercker's new step building system, and in doing so breaking changes were introduced.
install_pygments
parameter.Starting with Hugo 0.43 there is an extended version of Hugo available that supports SASS compiling and other functionalities. Per version 2.8.0 of this step, that is the version being used when using Hugo 0.43 or higher.
version
: (optional) Specify the version of Hugo to be installed. See below for a more extensive explanation.theme
: (optional) Specifies the theme to be used for the generation of the site. When this isn't defined no theme will be used.config
: (optional) If you wish to use a different config file than the default config.toml|yaml|json
you can provide the relative path and name of this file here.flags
: (optional) Apart from the theme and config file, other flags can be provided as a single string. These flags will be provided exactly as set.force_install
: (optional) Forces an install of Hugo, regardless of whether it is already installed in the container.install_pygments
: (optional) Installs Pygments in case you don't want to use the default Chroma.basedir
: (optional) Set a different directory than the root of the project as your Hugo source directory.clean_before
: (optional, default true) Removes the public
directory before build.dev_flags
: (optional) Set specific flags for your development branches, overrides flags
, config
, themes
.prod_branches
: (optional) A space delimited list of your production git branches, all other branches will use dev_flags
. This conflicts with dev_branches
.dev_branches
: (optional) A space delimited list of your development git branches, which will then use dev_flags
parameters. This conflicts with prod_branches
.This parameter specifies the version of Hugo to be used, by default this is "0.74.3"
. It is recommended to set this, so you don't accidentally build you site with a version it isn't ready for. You can look up valid version numbers here - note that you need to specify the minor version number (0 in "0.61.0") as well - skipping it will not work. Due to Wercker not being able to properly handle 0.x
version numbers, you will need to put quotes around the version number.
You can specify "HEAD" as the version, which will pull in the latest code of the Hugo master
branch from GitHub and compile it. Please note that this means using a version of Hugo that is not released and might be unstable, so use this at your own risk.
box: debian
build:
steps:
- arjen/hugo-build:
version: "0.74.3"
theme: redlounge
config: second-config.toml
flags: --disableKinds=["sitemap"]