HUGO
Menu
GitHub 90437 stars Mastodon

hugo.Version

Returns the current version of the Hugo binary.
Syntax
hugo.Version
Returns
hugo.VersionString

Usage

The hugo.Version function returns the current version of the Hugo binary. Use comparison functions such as compare.Ge and compare.Lt with the returned value to compare versions by semantic version precedence instead of by string order.

Examples

{{ hugo.Version }} → 0.169.0

Comparing versions:

{{ ge hugo.Version "0.99.0" }} → true
{{ lt hugo.Version "0.200.0" }} → true