1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

32 lines
576 B
Go
Raw Normal View History

package hugolib
import (
"fmt"
"github.com/spf13/hugo/helpers"
"html/template"
)
var (
CommitHash string
BuildDate string
)
var hugoInfo *HugoInfo
2015-01-19 02:40:34 +01:00
// HugoInfo contains information about the current Hugo environment
type HugoInfo struct {
Version string
Generator template.HTML
CommitHash string
BuildDate string
}
func init() {
hugoInfo = &HugoInfo{
Version: helpers.HugoVersion(),
CommitHash: CommitHash,
BuildDate: BuildDate,
Generator: template.HTML(fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, helpers.HugoVersion())),
}
}