From 831d23cb4d1ca99cdc15ed31c8ee1f981497be8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 26 Nov 2018 10:11:22 +0100 Subject: Add tpl/site and tpl/hugo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- commands/genman.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands/genman.go') diff --git a/commands/genman.go b/commands/genman.go index ac4eaf8d1..720046289 100644 --- a/commands/genman.go +++ b/commands/genman.go @@ -17,6 +17,7 @@ import ( "fmt" "strings" + "github.com/gohugoio/hugo/common/hugo" "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/hugo/hugofs" "github.com/spf13/cobra" @@ -45,7 +46,7 @@ in the "man" directory under the current directory.`, header := &doc.GenManHeader{ Section: "1", Manual: "Hugo Manual", - Source: fmt.Sprintf("Hugo %s", helpers.CurrentHugoVersion), + Source: fmt.Sprintf("Hugo %s", hugo.CurrentVersion), } if !strings.HasSuffix(cc.genmandir, helpers.FilePathSeparator) { cc.genmandir += helpers.FilePathSeparator -- cgit v1.2.3