Make ge, le etc. work with the Hugo Version number
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 22 Feb 2018 08:15:12 +0000 (09:15 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 22 Feb 2018 08:15:12 +0000 (09:15 +0100)
commit0602135fd44b0cfa0a51b0ec6e451ae58ac95666
treebb045df0360b26dbacf682fa227d5d4e18d57bdc
parent55bd46a633d68f62e131457631ba839d6f876a55
Make ge, le etc. work with the Hugo Version number

This means that you can do something ala:

```html
{{ if ge .Hugo.Version "0.36" }}Reasonable new Hugo version!{{ end }}
```

The intented use is feature toggling, but please note that it will take some time and Hugo versions until this can be trusted. It does not work in older Hugo versions.

Fixes #4443
compare/compare.go [new file with mode: 0644]
compare/eq.go [deleted file]
helpers/hugo.go
helpers/hugo_test.go
hugolib/hugo_info.go
hugolib/hugo_info_test.go [new file with mode: 0644]
tpl/compare/compare.go
tpl/compare/compare_test.go
tpl/compare/init.go
tpl/tplimpl/template_funcs_test.go