GitUtils Extension

The "gitutils" extension provides a mechanism for gleaning information regarding the git repository that the documentation build command is being executed within.

Table 1: Configuration items for the "gitutils" extension.

KeyDefaultDescription
activeTrueToggle for disabling the extension. This only changes the initial active state, use setActive to control at runtime.

Commit

The "commit" sub-command inserts the current commit SHA-1 for the repository of the working directory of the documentation build. Example 1 is an example that demonstrates the use of this command. The available settings for the this command are provided in Table 2.

Table 2: Available settings for the !git commit command.

KeyDefaultDescription
styleNoneThe style settings that are passed to rendered HTML tag.
classNoneThe class settings to be passed to rendered HTML tag.
idNoneThe class settings to be passed to the rendered tag.

Example 1: Example of reporting the current commit.

!git commit

The current commit is [!git!commit].