mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
7257ab6855
commit
c23dfd99dd
2 changed files with 7 additions and 10 deletions
|
@ -17,14 +17,11 @@ type HugoInfo struct {
|
|||
BuildDate string
|
||||
}
|
||||
|
||||
func getHugoInfo() *HugoInfo {
|
||||
if hugoInfo == nil {
|
||||
hugoInfo = &HugoInfo{
|
||||
Version: Version,
|
||||
CommitHash: CommitHash,
|
||||
BuildDate: BuildDate,
|
||||
Generator: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
||||
}
|
||||
func init() {
|
||||
hugoInfo = &HugoInfo{
|
||||
Version: Version,
|
||||
CommitHash: CommitHash,
|
||||
BuildDate: BuildDate,
|
||||
Generator: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
||||
}
|
||||
return hugoInfo
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ func (n *Node) IsMenuCurrent(menuId string, inme *MenuEntry) bool {
|
|||
}
|
||||
|
||||
func (n *Node) Hugo() *HugoInfo {
|
||||
return getHugoInfo()
|
||||
return hugoInfo
|
||||
}
|
||||
|
||||
func (n *Node) isSameAsDescendantMenu(inme *MenuEntry, parent *MenuEntry) bool {
|
||||
|
|
Loading…
Reference in a new issue