Hugo

The sbt-site plugin has support for building Hugo projects. To enable Hugo site generation, simply enable the associated plugin in your build.sbt file:

enablePlugins(HugoPlugin)

The hugo binary must be installed on your $PATH in order to be accessible to sbt-site. In addition, this plugin assumes you have a Hugo project under the src/hugo directory. To change this, set the sourceDirectory key in the Hugo scope:

sourceDirectory in Hugo := sourceDirectory.value / "doc"

You may also change the base-url that gets passed to the hugo command by adjusting the following setting:

baseURL in Hugo := uri("https://yourdomain.com")

To export environment variables when forking the hugo process, for example to render with Hugo’s getenv function, use:

extraEnv in Hugo := Map("MY_ENV" -> "Is set!", "MY_OTHER_ENV" -> "Is also set.")