HTML Single Extension

The Antora HTML Single extension is an exporter extension for Assembler that handles converting content prepared by Assembler to a standalone HTML document using Asciidoctor by default.

Summary

package name

@antora/html-single-extension

require name

@antora/html-single-extension

backend

html

extname

.html

mediaType

text/html

default command

asciidoctor (prefixed with bundle exec if Gemfile.lock is present)

Description

The Antora HTML Single extension is based on Antora Assembler. It provides the converter metadata and convert function that Assembler uses to export content. The rest is handled by Assembler itself.

Assembler constructs the content of assembly files from pages per component version using the navigation as a model. Using the converter provided by this extension, it then iterates over those assembly files and converts them to a standalone HTML document using Asciidoctor (or the specified command or Asciidoctor.js). Finally, it adds those HTML documents to the content catalog as exports, which Antora then publishes alongside the other files in the site.

Use Asciidoctor.js

You can configure the converter to use the same Asciidoctor.js API used by Antora itself by setting the build command to false in the Assembler configuration file.

Example 1. antora-assembler-html-single.yml
build:
  command: false

When the converter uses Asciidoctor.js, it activates the same Asciidoctor.js extensions used in the site. It also automatically has the Asciidoctor to Antora logger integration enabled.