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 run:
$ node --version
If you need to upgrade to the latest Node LTS version, run:
$ nvm install --lts
$ nvm install 12.16.2
Next, to set the latest version of Node as the default for any new terminal, run:
$ nvm alias default 12
$ 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, run:
$ npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3
npm will automatically install the latest version of Antora.
Upgrade the Antora CLI and site generator separately
If you have installed the Antora CLI globally, but the Antora site generator in the project, you’ll need to upgrade them separately.
-
Upgrade the CLI globally by typing:
$ npm i -g @antora/cli@2.3
-
Change to your local project directory. This is typically where your Antora playbook file, antora-playbook.yml, is stored.
-
Open the package.json file.
-
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" } }
-
Save the file.
-
Remove the node_modules folder and package-lock.json file. Although removing the node_modules folder is not always required, doing so ensure you get the result that you want.
-
Upgrade the site generator by running the
npm i
command.$ npm i
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.