From 732d10ec461b80c12a1ffe87c558951a6e8d380c Mon Sep 17 00:00:00 2001 From: PeskyPotato Date: Fri, 5 Jul 2024 12:02:23 +0000 Subject: [PATCH] source: Expose GitInfo Body Updated bep/gitmap to v1.4.0, to get commit message's Body. Added Body to GitInfo struct. Docs upated with commit body example. Fixes #10905 --- content/en/methods/page/GitInfo.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/en/methods/page/GitInfo.md b/content/en/methods/page/GitInfo.md index 9dba2a2b2..c54a77371 100644 --- a/content/en/methods/page/GitInfo.md +++ b/content/en/methods/page/GitInfo.md @@ -113,6 +113,16 @@ This is configurable. See [details]. {{ end }} ``` +###### Body + +(`string`) The commit message body. + +```go-html-template +{{ with .GitInfo }} + {{ .Body }} → - Two new pages added. +{{ end }} +``` + ## Last modified date By default, when `enableGitInfo` is `true`, the `Lastmod` method on a `Page` object returns the Git AuthorDate of the last commit that included the file.