summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-26 10:11:22 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-12-06 14:37:25 +0100
commit831d23cb4d1ca99cdc15ed31c8ee1f981497be8f (patch)
tree8fe47b1b1b9233448297f8015ce61bbb7da13fc7 /commands/hugo.go
parent514e18dc27ce37a0e9a231741d616cf29d50d610 (diff)
Add tpl/site and tpl/hugo
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc. Fixes #5470 Fixes #5467 Fixes #5503
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 0bb15c3d1..759efc17b 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -23,6 +23,7 @@ import (
"sort"
"sync/atomic"
+ "github.com/gohugoio/hugo/common/hugo"
"github.com/pkg/errors"
"github.com/gohugoio/hugo/common/herrors"
@@ -1041,7 +1042,7 @@ func (c *commandeer) isThemeVsHugoVersionMismatch(fs afero.Fs) (dir string, mism
}
if minVersion, ok := tomlMeta["min_version"]; ok {
- if helpers.CompareVersion(minVersion) > 0 {
+ if hugo.CompareVersion(minVersion) > 0 {
return absThemeDir, true, fmt.Sprint(minVersion)
}
}