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:
Jens Broekens
2025-03-26 20:12:48 +01:00
committed by Bjørn Erik Pedersen
parent e4f6b9eef8
commit 61e6c730dd
5 changed files with 60 additions and 6 deletions

View File

@@ -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")
}