@cppalliance/antora-playbook-macros-extension

0.0.2 • Public • Published

Antora Playbook Macros Extension

This allows you to use macros in your Antora playbook.

Configuration {#_configuration}

Any value in the playbook can use a macro with the ${key} syntax. The value will be replaced by the macro value as defined by one of the following sources:

  1. Environment variable

  2. Uppercase environment variable

  3. Asciidoc attribute

  4. Default value

  5. Predefined macros

Asciidoc attributes comes from the asciidoc.attributes section of the playbook. They can also be set in the antora command line using the --attribute option.

Default values are defined in the macros section of extension configuration. The provide a way to define default values for macros that are not set in any other source.

The predefined macros are:

  • branch: The current branch name as per git rev-parse --abbrev-ref HEAD

  • commit-id: The current commit hash as per git rev-parse HEAD

Package Sidebar

Install

npm i @cppalliance/antora-playbook-macros-extension

Weekly Downloads

128

Version

0.0.2

License

BSL-1.0

Unpacked Size

20.1 kB

Total Files

9

Last publish

Collaborators

  • samdarwin
  • alandefreitas