Merge commit '7125ad401ad043e46262afc7eca8dceb6d54bb9e'

This commit is contained in:
Bjørn Erik Pedersen
2024-01-26 08:22:42 +01:00
141 changed files with 904 additions and 813 deletions

View File

@@ -34,7 +34,7 @@ hugo --enableGitInfo
```
{{% note %}}
When you set `enableGitInto` to `true`, or enable the feature with the command line flag, the last modification date for each content page will be the Author Date of the last commit for that file.
When you set `enableGitInfo` to `true`, or enable the feature with the command line flag, the last modification date for each content page will be the Author Date of the last commit for that file.
This is configurable. See [details].
@@ -43,8 +43,9 @@ This is configurable. See [details].
## Methods
AbbreviatedHash
: (`string`) The abbreviated commit hash.
###### AbbreviatedHash
(`string`) The abbreviated commit hash.
```go-html-template
{{ with .GitInfo }}
@@ -52,8 +53,9 @@ AbbreviatedHash
{{ end }}
```
AuthorDate
: (`time.Time`) The author date.
###### AuthorDate
(`time.Time`) The author date.
```go-html-template
{{ with .GitInfo }}
@@ -61,8 +63,9 @@ AuthorDate
{{ end }}
```
AuthorEmail
: (`string`) The author's email address, respecting [gitmailmap].
###### AuthorEmail
(`string`) The author's email address, respecting [gitmailmap].
```go-html-template
{{ with .GitInfo }}
@@ -70,8 +73,9 @@ AuthorEmail
{{ end }}
```
AuthorName
: (`string`) The author's name, respecting [gitmailmap].
###### AuthorName
(`string`) The author's name, respecting [gitmailmap].
```go-html-template
{{ with .GitInfo }}
@@ -79,8 +83,19 @@ AuthorName
{{ end }}
```
Hash
: (`string`) The commit hash.
###### CommitDate
(`time.Time`) The commit date.
```go-html-template
{{ with .GitInfo }}
{{ .CommitDate.Format "2006-01-02" }} → 2023-10-09
{{ end }}
```
###### Hash
(`string`) The commit hash.
```go-html-template
{{ with .GitInfo }}
@@ -88,8 +103,9 @@ Hash
{{ end }}
```
Subject
: (`string`) The commit message subject.
###### Subject
(`string`) The commit message subject.
```go-html-template
{{ with .GitInfo }}