Generator Events Reference
Antora extensions listen for events emitted by the generator when Antora runs. Each listener can access variables that are in scope at the time the event is emitted. The following table lists the generator events in the order they’re emitted and the context (in-scope) variables that correspond to each event. If the variable is locked, meaning it cannot be replaced, it’s italicized.
Event name | In-scope variables |
---|---|
register()[1] |
playbook, config |
contextStarted[2] |
playbook |
playbookBuilt |
playbook |
beforeProcess |
playbook, siteAsciiDocConfig, siteCatalog |
contentAggregated[3] |
playbook, siteAsciiDocConfig, siteCatalog, contentAggregate |
uiLoaded[3] |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog |
contentClassified |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
documentsConverted |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
navigationBuilt |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog, navigationCatalog |
pagesComposed |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
redirectsProduced |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
siteMapped[4] |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
beforePublish |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog |
sitePublished |
playbook, siteAsciiDocConfig, siteCatalog, uiCatalog, contentCatalog, publications |
contextStopped |
(any variable still in scope at the time the context is stopped) |
contextClosed[5] |
(any variable still in scope at the time the context is closed) |
In addition to the built-in context variables listed in this table, your extension can also access context variables documented and published by other extensions.
siteMapped
event is only emitted if the site URL is specified in the playbook.
contextClosed
event are expected to catch their own errors so all listeners are notified.