Build the Documentation Site Locally

  1. Open a terminal and switch into the docs-site folder.

    $ cd path/to/docs-site
  2. Run Antora, using the antora command with the staging playbook:

    docs-site $ antora staging-antora-playbook
  3. The cloning progress of each component repository is displayed in the console, followed by any AsciiDoc or Antora warning and error messages. The site generation is complete when the command prompt ($) reappears in the terminal.

  4. Antora generated the site into a directory named public. Switch to it.

    docs-site $ cd public
  5. On some operating systems, you can open the site directly from the command line by typing open and the name of an HTML file.

    public $ open index.html

    Or, you can navigate to and open index.html using your file explorer or browser.

Now that you’re set up to build the site locally, you can run Antora with a local playbook and test your documentation changes.

Antora relies on the SSH agent to authenticate private repositories on your behalf. If Antora fails because it can’t connect to the private repositories in the playbook, you’re SSH agent probably isn’t running. See SSH Authentication to learn how to configure and run your SSH agent