Fetch Updates

Use the fetch key whenever you want to retrieve updates from the remote content sources repositories and UI bundle snapshots.

Fetch operations

Activating the fetch key from a playbook or the CLI causes Antora to perform both of the following actions each time it runs:

  1. Run a fetch operation for all remote content sources repositories Antora has cloned, or clone them otherwise.

  2. Download the remote UI bundle if it’s marked as a snapshot, even if it has already been downloaded.

Antora only fetches updates for remote content sources since the clones are managed by Antora. Antora never fetches updates for local content sources (i.e., local git repositories). In other words, Antora does not run git fetch or git pull on a local git repository. Doing so would runs the risk of putting them into an inconsistent state or otherwise interfering with the author’s work. Antora leaves managing the state of local content repositories up to the author.

fetch key

The first time Antora runs a playbook, it clones any remote content sources git repositories and downloads the UI bundle into the Antora cache directory. On subsequent runs, Antora resolves these resources in the cache folder, effectively running offline.

You can instruct Antora to refresh the cache by setting the optional fetch key to true. The fetch key is configured under the runtime key in a playbook.

Example 1. antora-playbook.yml
  fetch: true

Fetch option

You don’t have to modify the playbook file directly to set this key. You can use the --fetch option from the CLI.

$ antora --fetch antora-playbook.yml

The --fetch option overrides the value assigned to the fetch key in the playbook file.