Upgrade Antora

On this page, you’ll learn:

  • How to upgrade Node. (optional)

  • How to upgrade Antora globally.

  • How to upgrade the Antora CLI and default site generator individually.

Upgrade Node (optional)

You can use any currently supported Node LTS release with Antora, but we recommend using the most recent LTS version so that you benefit from the latest performance and security enhancements. The Node release schedule shows which Node LTS versions are active.

To check which Node version you have installed, open a terminal and type:

$ node --version

If you need to upgrade to the latest Node LTS version, type:

Linux and macOS
$ nvm install --lts
Windows
$ nvm install 12.16.2

Next, to set the latest version of Node as the default for any new terminal, type:

Linux and macOS
$ nvm alias default 12
Windows
$ nvm alias default 12.16.2

Now you’re ready to upgrade to the latest version of Antora.

Upgrade Antora globally

If you installed the Antora CLI and default site generator globally, you can upgrade them at the same time.

In a terminal, type:

$ npm install -g @antora/cli@2.3 @antora/site-generator-default@2.3

npm will automatically install the latest version of Antora.

Do I have Antora installed globally?

To list your globally installed Node packages, type the following command in your terminal:

$ npm ls -g --depth=0

If you installed the Antora CLI and site generator globally, you’ll see them listed in the terminal output alongside their version numbers (where .x represents the latest patch number).

List of globally installed Node packages
/home/user/.nvm/versions/node/v12.16.2/lib
├── @antora/cli@2.3.x
├── @antora/site-generator-default@2.3.x
├── npm@6.14.4
└── ...

If you only see the CLI (@antora/cli) listed, then you installed the site generator in a specific local project directory. In this case, you’ll need to upgrade the Antora CLI and site generator as described in the following section.

Upgrade the Antora CLI and site generator separately

If you didn’t install a previous version of Antora site generator globally, you’ll need to upgrade the Antora CLI and default site generator separately.

  1. Upgrade the CLI globally by typing:

    $ npm install -g @antora/cli@2.3
  2. Change to your local project directory. This is typically where your Antora playbook file, antora-playbook.yml, is stored.

  3. Open the package.json file.

  4. Change the version number of the site generator. We recommend specifying a partial version number (major.minor) so that you receive the latest patch update.

    {
      "dependencies": {
        "@antora/site-generator-default": "2.3"
      }
    }
  5. Save the file.

  6. Upgrade the site generator by running the npm install command.

    $ npm install
    If you’re using yarn instead of npm, run the yarn command after updating package.json. It may be necessary to pass the --force flag to force an update.

You’ve now upgraded to the latest version of Antora.

Learn more

Review What’s New in Antora for the latest features and potential breaking changes.