Upgrade Antora

On this page, you’ll learn:

  • How to upgrade the Antora CLI.

  • How to upgrade the default Antora site generator.

The CLI version and default site generator version must be the same. If you follow these instructions when you upgrade, the versions will stay in sync.

Upgrade the CLI

To upgrade the CLI, open a terminal and type:

$ npm install -g @antora/cli@1.0

The Node package manager (npm) will automatically install the latest version of the CLI.

If you installed the CLI and the default site generator globally, you can upgrade both of them with the same command.

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

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

$ npm ls -g --depth=0

If the CLI and site generator are installed globally, you’ll see them listed in the terminal output. The output will also show the CLI and site generator versions (where .x represents the latest patch number). The versions of these two packages should match.

List of globally installed Node packages
├── @antora/cli@1.0.x
├── @antora/site-generator-default@1.0.x
├── npm@5.6.0
└── ...

To list the Node packages you have installed locally in a project, go to that directory and type:

$ npm ls --depth=0

Upgrade the default site generator

The method for upgrading the default site generator depends on whether it is installed globally or inside a playbook project.

If it’s installed globally, the command to upgrade it is:

$ npm install -g @antora/site-generator-default@1.0

If you installed the site generator in a playbook project, update the version number of the site generator in the package file.

  1. Switch to the playbook project directory.

  2. Open the package.json file.

  3. Change the version number of the site generator.

      "dependencies": {
        "@antora/site-generator-default": "1.0"
  4. Save the file.

  5. 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 the Antora CLI and default site generator.

What’s next?