diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-18 12:23:13 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-18 12:23:13 +0100 |
commit | 3273fce044f06f90ae296f9b42431958d2b06e7f (patch) | |
tree | 4556f7b1c7ffa73d53d3d5d08214999c095868c7 /hugolib | |
parent | 49f20bbc9bf4eb9ecedfa0fd9dde484256ae91d1 (diff) |
Refactor Hugo version
Put version handling into the helpers package so it can be used by many,
and split version and suffix to make it possible to calculate the next Hugo version.
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/hugo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hugolib/hugo.go b/hugolib/hugo.go index 17ca1c237..da08b93b9 100644 --- a/hugolib/hugo.go +++ b/hugolib/hugo.go @@ -1,11 +1,11 @@ package hugolib import ( + "fmt" + "github.com/spf13/hugo/helpers" "html/template" ) -const Version = "0.14-DEV" - var ( CommitHash string BuildDate string @@ -23,9 +23,9 @@ type HugoInfo struct { func init() { hugoInfo = &HugoInfo{ - Version: Version, + Version: helpers.HugoVersion(), CommitHash: CommitHash, BuildDate: BuildDate, - Generator: `<meta name="generator" content="Hugo ` + Version + `" />`, + Generator: template.HTML(fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, helpers.HugoVersion())), } } |