Merge commit '87de22d7464e239c775fbd48ebce1665d5b1e80d'

This commit is contained in:
Bjørn Erik Pedersen
2023-07-29 11:17:28 +02:00
177 changed files with 1623 additions and 1556 deletions

View File

@@ -1,8 +1,8 @@
---
title: Git Info Variables
linktitle: Git Variables
title: Git variables
linkTitle: Git variables
description: Get the last Git revision information for every content file.
categories: [variables and params]
categories: [variables and parameters]
keywords: [git]
menu:
docs:
@@ -16,13 +16,13 @@ aliases: [/extras/gitinfo/]
Hugo's Git integrations should be fairly performant but *can* increase your build time. This will depend on the size of your Git history.
{{% /note %}}
## `.GitInfo` Prerequisites
## `.GitInfo` prerequisites
1. The Hugo site must be in a Git-enabled directory.
2. The Git executable must be installed and in your system `PATH`.
3. The `.GitInfo` feature must be enabled in your Hugo project by passing `--enableGitInfo` flag on the command line or by setting `enableGitInfo` to `true` in your [site's configuration file][configuration].
## The `.GitInfo` Object
## The `.GitInfo` object
The `GitInfo` object contains the following fields: