mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
source: Expose Ancestor in GitInfo
Also updates docs and bumps bep/gitmap to v1.7.0 Closes #5693 Co-authored-by: bep <bjorn.erik.pedersen@gmail.com>
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
e4f6b9eef8
commit
61e6c730dd
@@ -220,3 +220,23 @@ disableLiveReload = true
|
||||
|
||||
b.AssertFileContent("public/index.html", "1\n2\n3")
|
||||
}
|
||||
|
||||
func TestThatPageGitInfoShouldBeZero(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
disableKinds = ["taxonomy", "term"]
|
||||
-- content/p1.md --
|
||||
---
|
||||
title: "P1"
|
||||
---
|
||||
-- layouts/all.html --
|
||||
GitInfo: {{ with .GitInfo }}FAIL{{ end }}
|
||||
|
||||
`
|
||||
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/p1/index.html", "! FAIL")
|
||||
}
|
||||
|
Reference in New Issue
Block a user