Install the Extension

The Antora Collector extension requires Node.js 16 or greater and Antora 3.1 or greater. No external commands are required, by default. The only external commands required are the ones that Collector is configured to run using the run action of a Collector instance.

Prerequisites

The instructions in the following sections assume you’ve already set up a playbook project, an Antora playbook file (i.e., antora-playbook.yml), and that you’re running the commands from your playbook project.

Node.js

This software requires Node.js 16 or greater. To see if you have Node.js installed, and which version, type:

$ node -v

You should see a version string, such as:

$ node -v
v20.16.0

If no version number is displayed in your terminal, you need to install Node.js. Follow one of these guides to learn how to install nvm and Node.js on your platform.

Antora

The Antora Collector extension requires Antora 3.1 or greater. To confirm you have a suitable version of Antora installed, run:

$ npx antora -v

The command should report the version of the Antora CLI and site generator you have installed. If you’re not yet using Antora 3.1 or greater, you need to upgrade to use the Collector extension.

Once you’ve satisfied the prerequisites, you’re ready to install the Collector extension in your playbook project.

Install the extension package

To install the package for the Antora Collector extension in your playbook project, type the following command:

$ npm i @antora/collector-extension

This command installs the extension package alongside Antora and any other extensions or libraries you’re using in your playbook project.

We strongly recommend that you install Antora, this extension, and any other extensions that you use in your playbook project, the directory where your site’s Antora playbook file (e.g., antora-playbook.yml) is located. If you install the npm packages globally, they can interfere with other software install on your system and conflicts may occur.

Now that the extension is properly installed, you need to register the extension in your playbook.