2014-12-09 10:36:07 -05:00
|
|
|
package hugolib
|
|
|
|
|
2015-01-19 02:26:06 -05:00
|
|
|
import (
|
|
|
|
"html/template"
|
|
|
|
)
|
|
|
|
|
2015-02-21 23:11:36 -05:00
|
|
|
const Version = "0.14-DEV"
|
2014-12-09 10:36:07 -05:00
|
|
|
|
|
|
|
var (
|
|
|
|
CommitHash string
|
|
|
|
BuildDate string
|
|
|
|
)
|
|
|
|
|
2015-01-18 20:53:07 -05:00
|
|
|
var hugoInfo *HugoInfo
|
|
|
|
|
2015-01-18 20:40:34 -05:00
|
|
|
// HugoInfo contains information about the current Hugo environment
|
2014-12-09 10:36:07 -05:00
|
|
|
type HugoInfo struct {
|
|
|
|
Version string
|
2015-01-19 02:26:06 -05:00
|
|
|
Generator template.HTML
|
2014-12-09 10:36:07 -05:00
|
|
|
CommitHash string
|
|
|
|
BuildDate string
|
|
|
|
}
|
|
|
|
|
2015-01-18 21:06:07 -05:00
|
|
|
func init() {
|
|
|
|
hugoInfo = &HugoInfo{
|
|
|
|
Version: Version,
|
|
|
|
CommitHash: CommitHash,
|
|
|
|
BuildDate: BuildDate,
|
|
|
|
Generator: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
2014-12-09 10:36:07 -05:00
|
|
|
}
|
|
|
|
}
|