How to show the build version in the footer

The extension computes git describe --tags --always --dirty once per build and exposes it as git_describe. This page shows how to render that version in each output format.

Show the version in AsciiDoc content

The 3191517 attribute resolves in AsciiDoc content in every backend (HTML, PDF, and DOCX):

Built from {git_describe}.

Edit the footer partial in your UI theme (partials/footer-content.hbs) to read the site key:

{{#if site.keys.git_describe}}
  <span class="build-version">Built from {{site.keys.git_describe}}</span>
{{/if}}

To override the footer without editing or re-releasing the theme, use ui.supplemental_files to point at a directory holding a partials/footer-content.hbs replacement, as the example site playbook does.

Reference the attribute in your PDF theme (pdf-theme.yml):

footer:
  recto:
    right:
      content: 'Built from {git_describe}'

The DOCX pipeline consumes the assembled AsciiDoc, so 3191517 resolves in document content. A running page footer requires a pandoc --reference-doc template with a footer field; that is outside the scope of this guide.

How it works

The extension injects git_describe into site.keys (for HTML templates) and asciidoc.attributes (for AsciiDoc, PDF, and DOCX) at build time. No configuration is required. When the build runs outside a git repository, the key is absent, so a conditional footer renders nothing and the build succeeds.