@alandefreitas/antora-playbook-macros-extension v0.0.1
This allows you to use macros in your Antora playbook.
Configuration {#_configuration}
npm {#_npm}
Install this extension
npm i -D @alandefreitas/antora-playbook-macros-extensionPlaybook {#_playbook}
Append the following in your playbook.yaml:
antora:
extensions:
- require: '@alandefreitas/antora-playbook-macros-extension' #
macros: #
key1: value1
key2: value2\<1>
npmpackage name:@alandefreitas/antora-playbook-macros-extension(required)\<2> List of default macros and values (optional)
Using macros {#_using_macros}
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:
Environment variable
Uppercase environment variable
Asciidoc attribute
Default value
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 pergit rev-parse --abbrev-ref HEADcommit-id: The current commit hash as pergit rev-parse HEAD
1 year ago