mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-20 12:13:05 +00:00
parent
7257ab6855
commit
c23dfd99dd
2 changed files with 7 additions and 10 deletions
|
@ -17,8 +17,7 @@ type HugoInfo struct {
|
||||||
BuildDate string
|
BuildDate string
|
||||||
}
|
}
|
||||||
|
|
||||||
func getHugoInfo() *HugoInfo {
|
func init() {
|
||||||
if hugoInfo == nil {
|
|
||||||
hugoInfo = &HugoInfo{
|
hugoInfo = &HugoInfo{
|
||||||
Version: Version,
|
Version: Version,
|
||||||
CommitHash: CommitHash,
|
CommitHash: CommitHash,
|
||||||
|
@ -26,5 +25,3 @@ func getHugoInfo() *HugoInfo {
|
||||||
Generator: `<meta name="generator" content="Hugo ` + Version + `" />`,
|
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 {
|
func (n *Node) Hugo() *HugoInfo {
|
||||||
return getHugoInfo()
|
return hugoInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Node) isSameAsDescendantMenu(inme *MenuEntry, parent *MenuEntry) bool {
|
func (n *Node) isSameAsDescendantMenu(inme *MenuEntry, parent *MenuEntry) bool {
|
||||||
|
|
Loading…
Add table
Reference in a new issue