summaryrefslogtreecommitdiffstats
path: root/docs/content/en/methods/page/GitInfo.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/methods/page/GitInfo.md')
-rw-r--r--docs/content/en/methods/page/GitInfo.md42
1 files changed, 29 insertions, 13 deletions
diff --git a/docs/content/en/methods/page/GitInfo.md b/docs/content/en/methods/page/GitInfo.md
index 88137614c..9dba2a2b2 100644
--- a/docs/content/en/methods/page/GitInfo.md
+++ b/docs/content/en/methods/page/GitInfo.md
@@ -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 }}