File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
docs/content/en/methods/page Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -117,22 +117,22 @@ hugo --enableGitInfo
117
117
{{ end }}
118
118
```
119
119
120
- ###### Ancestor
120
+ ### Ancestors
121
121
122
- (` *source.GitInfo ` ) The file-filtered ancestor commit , if any.
122
+ (` *source.GitInfo ` ) The file-filtered ancestor commits , if any.
123
123
124
124
``` go-html-template
125
- {{ partial "inline/changelog.html" .GitInfo }} → 2023-10-09: Add tutorials
126
- 2025-03-26: Edit GitInfo docs
127
-
128
- {{ define "_partials/inline/changelog.html" }}
129
- {{ with . }}
130
- {{ partial "inline/changelog.html" .Ancestor }}
131
- {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }}<br>
125
+ {{ with .GitInfo }}
126
+ {{ range .Ancestors | first 5 }}
127
+ {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }}
132
128
{{ end }}
133
129
{{ end }}
134
130
```
135
131
132
+ ### Parent
133
+
134
+ (` *source.GitInfo ` ) The first file-filtered ancestor commit, if any.
135
+
136
136
## Last modified date
137
137
138
138
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.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ require (
8
8
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.44.10
9
9
github.com/bep/clocks v0.5.0
10
10
github.com/bep/debounce v1.2.0
11
- github.com/bep/gitmap v1.7 .0
11
+ github.com/bep/gitmap v1.9 .0
12
12
github.com/bep/goat v0.5.0
13
13
github.com/bep/godartsass/v2 v2.5.0
14
14
github.com/bep/golibsass v1.2.0
Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo=
143
143
github.com/bep/debounce v1.2.0 /go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0 =
144
144
github.com/bep/gitmap v1.7.0 h1:jvPnRQv5RG6IDPrwoDiwAhTE/DmdEkOW4poFeUYmjI8 =
145
145
github.com/bep/gitmap v1.7.0 /go.mod h1:n+3W1f/rot2hynsqEGxGMErPRgT41n9CkGuzPvz9cIw =
146
+ github.com/bep/gitmap v1.8.0 h1:j03jlizRRo+0c+XKoV4h6qj4g3L3tUAt/ReSaSRdRWw =
147
+ github.com/bep/gitmap v1.8.0 /go.mod h1:n+3W1f/rot2hynsqEGxGMErPRgT41n9CkGuzPvz9cIw =
148
+ github.com/bep/gitmap v1.9.0 h1:2pyb1ex+cdwF6c4tsrhEgEKfyNfxE34d5K+s2sa9byc =
149
+ github.com/bep/gitmap v1.9.0 /go.mod h1:Juq6e1qqCRvc1W7nzgadPGI9IGV13ZncEebg5atj4Vo =
146
150
github.com/bep/goat v0.5.0 h1:S8jLXHCVy/EHIoCY+btKkmcxcXFd34a0Q63/0D4TKeA =
147
151
github.com/bep/goat v0.5.0 /go.mod h1:Md9x7gRxiWKs85yHlVTvHQw9rg86Bm+Y4SuYE8CTH7c =
148
152
github.com/bep/godartsass/v2 v2.5.0 h1:tKRvwVdyjCIr48qgtLa4gHEdtRkPF8H1OeEhJAEv7xg =
You can’t perform that action at this time.
0 commit comments