mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
ac6b86aff8
Added Version, CommitHash and BuildDate to hugolib/hugo.go and used it in build Removed commitHash and buildDate from commands/version.go and used hugolib vars Removed getDateFormat function from commands/version.go Conflicts: README.md docs/content/templates/variables.md
25 lines
467 B
Go
25 lines
467 B
Go
package hugolib
|
|
|
|
const Version = "0.13-DEV"
|
|
|
|
var (
|
|
CommitHash string
|
|
BuildDate string
|
|
)
|
|
|
|
// Hugo contains all the information about the current Hugo environment
|
|
type HugoInfo struct {
|
|
Version string
|
|
Generator string
|
|
CommitHash string
|
|
BuildDate string
|
|
}
|
|
|
|
func NewHugoInfo() HugoInfo {
|
|
return HugoInfo{
|
|
Version: Version,
|
|
CommitHash: CommitHash,
|
|
BuildDate: BuildDate,
|
|
Generator: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
|
}
|
|
}
|