@antora/collector-extension

1.0.0-beta.6 • Public • Published

Antora Collector Extension

The Antora Collector extension augments the content aggregation capabilities of Antora by allowing you to delegate to external commands that generate content and to import additional files into the content aggregate.

Overview

The Antora Collector extension allows you to designate zero or more external commands (e.g., gradlew generateContent) per content root that generate transient metadata or content within the context of the worktree for a git reference. The extension then scans for and imports files from specified directories into the content aggregate (and, in turn, the content catalog).

Install

Use the following command to install the extension into your playbook project:

$ npm i @antora/collector-extension

Register

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-playbook.yml

antora:
  extensions:
  - '@antora/collector-extension'

Configure

To configure the extension, you must define at least one run/scan operation under the ext.collector key in a component descriptor.

antora.yml

name: my-project
version: true
# ...
ext:
  collector:
    run:
      command: node generate-files.js
    scan:
      dir: build/generated-files

Copyright and License

Copyright (C) 2022-present by OpenDevise Inc. and the individual contributors of this project.

Use of this software is granted under the terms of the Mozilla Public License Version 2.0 (MPL-2.0).

Package Sidebar

Install

npm i @antora/collector-extension

Homepage

antora.org

Weekly Downloads

3,121

Version

1.0.0-beta.6

License

MPL-2.0

Unpacked Size

21.9 kB

Total Files

3

Last publish

Collaborators

  • mojavelinux
  • graphitefriction