The Antora Detect Unused Media Extension are intended to be used with Antora. Be sure to register them as Antora extensions in your playbook, not as AsciiDoc extensions.
Warning
|
This repository is work in progress and is not yet ready for production use. |
This extension check if media assets (located in assets/images
) are referenced in the .adoc
content with image:
or video:
.
In order to use this extension, you must be using Node.js 20. The following instructions assume you’ve already set up an Antora playbook file (i.e., antora-playbook.yml) to build your site.
To learn about using extensions with Antora, see the Antora extension documentation.
Use the following command to install the extension into your playbook project:
$ npm i @bonitasoft/antora-detect-unused-media-extension
Open your Antora playbook file and register the extension as an entry in the antora.extensions
key.
If this key doesn’t yet exist in your playbook, first create it.
antora:
extensions:
- require: '@bonitasoft/antora-detect-unused-media-extension'
excludeImageExtension: ['.png', 'gif']
You can configure this extension from configuration with attributes:
Attribute | Description | Default value |
---|---|---|
excludeImageExtension |
List of image extensions to exclude from detection. |
['.cast'] |
IMPORTANT
* By default, the .cast
extension are ignored