diff --git a/README.md b/README.md index 54190d4..6347c30 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,31 @@ module.exports = function (eleventyConfig) { The `base_dir` of [convert options](https://docs.asciidoctor.org/asciidoctor.js/latest/processor/convert-options/) is relative to the document. This can be changed using above [options](#customize-with-options). +##### `extension_registry` (⚠️ deprecated) + +From Asciidoctor.js v3.0 onwards, a new registry needs to be created and passed to the `extension_registry` option for each conversion. If you pass `extension_registry`, the extensions will be activated. Use [the `configure_extension_registry`](configure_extension_registry) function instead. + +##### `configure_extension_registry` + +The `configure_extension_registry` should be a function which accepts a `registry` (instance of `Extensions.Registry`). During each file conversion, the function will be called with a new `registry`. This `registry` instance be used to register extensions. + +```js +const eleventyAsciidoc = require("eleventy-plugin-asciidoc"); +const myExtension = require("./my-extension.js"); + +module.exports = function (eleventyConfig) { + eleventyConfig.addPlugin(eleventyAsciidoc, { + configure_extension_registry(registry) { + myExtension.register(registry); + // Or, myExtension(registry) depending on how you + // programmed you extension. + }, + }); +}; +``` + +Refer to [Asciidoctor.js documentation](https://docs.asciidoctor.org/asciidoctor.js/latest/extend/extensions/) to know more about extensions. + ### CSS Styles The plugin does not include any CSS styles. It is up to you to style the content.