Extensions

Asciidoctor provides an extension API that offers a list of extension points that open up the language to new use cases. Please refer to the API Reference to learn more aout the Asciidoctor Extension API.

The goal for Asciidoctor has always been to allow extensions to be written using the full power of a programming language, similar to what we’ve done with the backend (conversion) mechanism. That way, you don’t have to shave yaks to get the functionality you want, and you can distribute the extension using defacto-standard packaging mechanisms like npm.

The extension API in Asciidoctor is stable with the exception of inline macros. Since inline content is not parsed until the convert phase, the inline macro processor must return converted text (e.g., HTML) rather than an AST node. Once Asciidoctor is changed to process inline content during the parse phase, the inline macro processor will need to return an inline node. When that switch occurs, there will either be some sort of adapter or required migration for inline macro processors, but that has yet to be determined.