Generates a site using Hugo, a Fast and Flexible Website Generator.
The Build Task will automatically download the hugo executable, if the version is not already present on the build machine, and invoke it.
You can specify some common options.
- Source: relative path from repo root of the Hugo sources, defaults to
Build.SourcesDirectory, passed as--sourceflag. - Destination: path of Hugo generated site, typically
Build.ArtifactStagingDirectory, passed as--destinationflag. - Hugo Version: defines the Hugo version, use
latest,0.25.1,0.24, but notv0.24(pick valid values from Hugo Releases page). If the preferred version cannot be found, the latest released version will be used instead. - Extended Version: download the extended Hugo version (SCSS/SASS support).
- Base URL: sets the hostname (and path) to the root, e.g.
http://example.com/, passed as--baseURLflag. - Include Drafts: to include content marked as draft, passed as
--buildDraftsflag. - Include Expired: to include expired content, passed as
--buildExpiredflag. - Include Future: to include content with publishdate in the future, passed as
--buildFutureflag. Use Ugly URLs: to use/filename.htmlinstead of/filename/, passed as--uglyURLsflag.
A detailed walk through is here Building a Hugo Site with the Azure DevOps Extension
More Information on Hugo on this site.
The Hugo logos are copyright © Steve Francia 2013–2022.
- New Cross-platform implementation.
- Removed
uglyURLsoption, deprecated since Hugo 0.xx ??? - Added
additionalArgsoption to allow custom arguments.
- Fixes (ISSUE#5)
- Added support for Extended version (Hugo 0.43 and later)
- Use TLS 1.2 for GitHub API (PR#3)
- Initial release